Sunday 15 August 2010

java - JSON Parsing and returning hash map -



java - JSON Parsing and returning hash map -

i have sample json string in format below

{ "sample":{ "1":{ "a":100, "b":101 }, "2":{ "a":200, "b":101 }, "3":{ "a":100, "b":102 } } }

is there way retreive info in format map(string,map (string,integer)). in inner map need first element "a". understand can define new class construction , info , same transformed through objectmapper, not requirement in case.appreciate help.

the way see, transform object in needed representation before sending through mapper.

in case should, point of view, seek avoid manipulate generated json since can lead confusion in production or if developer has take on job.

it's much cleaner way define dto expresses needed representation.

best regards

java json

No comments:

Post a Comment