Forums Register Login

Hashmap edit

+Pie Number of slices to send: Send
Hi there,
I have the following mapping at the moment with a json lib.


I wanted to add the field 'State' as a child of Library alongside
Books.

Such as.

Any info on mapping additional field would be great.

Thanks

Robin
+Pie Number of slices to send: Send
Hi Robin and welcome to Javaranch!

What JSON lib are you using?
+Pie Number of slices to send: Send
Thanks.

GSON

Type HashLib = new TypeToken<HashMap <String, HashMap<String, List<HashMap<String, String>>>>>() {}.getType();

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1039 times.
Similar Threads
Problem with Array search
Annotations and EJB's
Struts 2 Iterate tag not getting the customed format
Problem in a while loop
Numberformater or substring or ????
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:16:19.