{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/bond/issues/100","labels_url":"https://api.github.com/repos/Microsoft/bond/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/bond/issues/100/comments","events_url":"https://api.github.com/repos/Microsoft/bond/issues/100/events","html_url":"https://github.com/Microsoft/bond/issues/100","id":116432271,"number":100,"title":"Need a custom transform example (WAS: Is it possible to deserialize partial data in its raw format?)","user":{"login":"redknightlois","id":1045411,"avatar_url":"https://avatars.githubusercontent.com/u/1045411?v=3","gravatar_id":"","url":"https://api.github.com/users/redknightlois","html_url":"https://github.com/redknightlois","followers_url":"https://api.github.com/users/redknightlois/followers","following_url":"https://api.github.com/users/redknightlois/following{/other_user}","gists_url":"https://api.github.com/users/redknightlois/gists{/gist_id}","starred_url":"https://api.github.com/users/redknightlois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redknightlois/subscriptions","organizations_url":"https://api.github.com/users/redknightlois/orgs","repos_url":"https://api.github.com/users/redknightlois/repos","events_url":"https://api.github.com/users/redknightlois/events{/privacy}","received_events_url":"https://api.github.com/users/redknightlois/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-11T22:10:57Z","updated_at":"2015-11-14T22:27:04Z","closed_at":null,"body":"I know this is a bit unorthodox, but I am not considering Bond as a message passing serialization layer. The raw performance of Bond make it a very interesting serialization technology for other uses too. :+1: on that. \r\n\r\nLets say I have this object T\r\n```csharp\r\n        public sealed class Documents\r\n        {\r\n            public long Etag;\r\n            public string Key;\r\n            public string Collection;\r\n            public IBonded<string> Data;\r\n        }\r\n```\r\nNow over this think I have to define an index over Key and Collection therefore I need to retrieve the \"raw bytes\" for Key and Collection (and not the object T) to build an indexing key. \r\n\r\nTo give a bit more context, what I have is something like this:\r\n```csharp\r\n_docsSchema = new TableSchema<Documents>(\"docs\")                \r\n            \r\n    .DefineIndex(\"By/Etag\", x => x.Etag)\r\n    .DefineIndex(\"By/Etag&Collection\", x => x.Collection, x => x.Etag)\r\n    .DefineKey(x => x.Key);\r\n```\r\n\r\nI dont really care about the types for x.Collection and/or x.Etag or whatever, I do care though about the binary representation of those. And by the way T can be different and so do the indexes defined over them. \r\n\r\nIs it viable to be done using the public API? \r\nIf not possible, How could I accomplish that with the internal API?\r\n\r\nEDIT: Probably the title should have been: \"Is it possible to retrieve the binary representation of inner properties after serialization?\""},"comment":{"url":"https://api.github.com/repos/Microsoft/bond/issues/comments/156751427","html_url":"https://github.com/Microsoft/bond/issues/100#issuecomment-156751427","issue_url":"https://api.github.com/repos/Microsoft/bond/issues/100","id":156751427,"user":{"login":"sapek","id":449129,"avatar_url":"https://avatars.githubusercontent.com/u/449129?v=3","gravatar_id":"","url":"https://api.github.com/users/sapek","html_url":"https://github.com/sapek","followers_url":"https://api.github.com/users/sapek/followers","following_url":"https://api.github.com/users/sapek/following{/other_user}","gists_url":"https://api.github.com/users/sapek/gists{/gist_id}","starred_url":"https://api.github.com/users/sapek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapek/subscriptions","organizations_url":"https://api.github.com/users/sapek/orgs","repos_url":"https://api.github.com/users/sapek/repos","events_url":"https://api.github.com/users/sapek/events{/privacy}","received_events_url":"https://api.github.com/users/sapek/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T22:27:04Z","updated_at":"2015-11-14T22:27:04Z","body":"Here an example of a transform extracting serialized values of fields (it is modified `serializer` example so you can copy-paste into that project to run it):\r\n\r\nhttps://gist.github.com/sapek/3c280db1bfac943bfe56\r\n\r\nIt is *very* over-simplified but run-able so hopefully it will help you start paying with transforms.\r\n\r\n"}}