Convert Anonymous java object types to JSON using GSon -
is there possibility serialize anonymous object type json using gson or else library on java ?
object objresult = new object() { boolean success = true; string email="mail@gmail.com"; }; string jsonstr = gson.tojson(objresult);
jsonstr : null !!
gson doesn't back upwards feature. user guide
fields corresponding outer classes in inner classes, anonymous classes, , local classes ignored , not included in serialization or deserialization
java json gson
No comments:
Post a Comment