mani-terrazas / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

MsgPack && BSON support #590

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's possible to serialize to MsgPack or BSON providing custom 
com.google.gson.stream.JsonWriter implementation. 

Unfortunally MsgPack and BSON operates yet another "primitive" type - binary 
(byte array). MsgPack and BSON provide effective way to store binary data. JSON 
use BASE64 string for this. Unfortunately JsonWriter doesn't know about this - 
there are no "value(byte[] value)" method.

I propose to add such method (com.google.gson.stream.JsonWriter can do base64 
convertion themself) so custom JsonWriter implementation can distinguish 
between "plain string" and "binary data";

Original issue reported on code.google.com by dimzon...@gmail.com on 21 Aug 2014 at 12:52