0

I am Developing an application using Spring MVC and JSP, what am trying to do is fetch some data from a URL, the URL's data is in JSON encoded multidimensional map.

For Example:

{"RT":"32",
 "HED":{
     "COMPINF":{
          "CP":"ISIN_CODE|SECTOR|LANGUAGE_CODE"}}}

I want to parse this code in the same way it came to me, I was trying to use a multidimensional hashmap but can't realy figure out a way.

What would be the best way to parse this data ?

engma
  • 1,849
  • 2
  • 26
  • 55

1 Answers1

3

You'll want to use a JSON parser such as Google Gson (https://code.google.com/p/google-gson/)

edit: Here is a similar question: Converting JSON to Java

Community
  • 1
  • 1
  • well I checked this question before but will it work with multidimensional maps ? – engma Apr 08 '13 at 09:33
  • as long as what is being passed in is valid JSON, it will go it will be able to go to any depth. Meaning it will look like a multidimensional map once it is parsed – Jayanth Madheswaran Apr 08 '13 at 17:57