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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -