java - Gson: show class name when serializing a map -
i have complex map serialize,
map<classa, map<classb, map<...>>>. i used gsonbuilder() , added enablecomplexmapkeyserialization(). worked fine like
[{ "foo": "bar" // data of }, [ { // data of b } // other information ] ] my question is, there way add class name json looks like
[ "classa": { "foo": "bar" // data of }, [ { // data of b } // other information ] ]
Comments
Post a Comment