This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hashmap edit  RSS feed

 
robin sa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Robin and welcome to Javaranch!

What JSON lib are you using?
 
robin sa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

GSON

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

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!