This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hashmap edit

 
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