Is there a way to trick corrugatediron into serializing a protobuf
class for me? I know I can serialize it to byte[] myself and Put that.
But I thought setting the ContentType might do the trick, but it looks
like it's getting saved as JSON instead. This might be a convenient
feature to add.

// create a proto-contract class
(https://code.google.com/p/protobuf-net/wiki/GettingStarted)
var testObj = new Person() {
                    Id = 42,
                    Name = "alex",
                    Address =  new Address() {
                        Line1 = "16 dusty road",
                        Line2 = "santa fe, nm 87508"
}};
var riakObj = new RiakObject("test", "key", testObj);
riakObj.ContentType = RiakConstants.ContentTypes.ProtocolBuffers;
db.Put( riakObj );

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to