java - Retain Dynamic Json Property names using map -


i have read json api response pojo, massage data bit, , return in same json format. json has dynamic property names, , causing me problems mapping pojo.

i read can use @jsonanysetter , read dynamic properties in map, not preserve names of dynamic properties. need names, have send same json on service.

here sample json service needs read,

{      "recommendationmethods":{         "personalized":{            "teams":{               "teamtrek":[                  {                     "name":"alex",                   "rank":0                },                {                     "name":"brian",                   "rank":1                }             ],             "teamfuji":[                  {                     "name":"emma",                   "rank":0                },                {                     "name":"stephanie",                   "rank":1                }             ]          }       },       "popular":{            "teams":{               "teamorbea":[                  {                     "name":"joe",                   "rank":0                },                {                     "name":"karina",                   "rank":1                }             ],             "teamspecialized":[                  {                     "name":"ross",                   "rank":0                }             ]          }       }    } } 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -