Quantcast
Channel: How do I traverse through a deeply nested JSON if it has an indefinite nesting in java? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by forkdbloke for How do I traverse through a deeply nested JSON if it...

APPROACH#0Convert JSON to POJO and make use of gson library, and you can iterate any object from POJO.APPROACH#1Please do not re-invent the wheel, as there are many libraries which has been created and...

View Article



Answer by OneCricketeer for How do I traverse through a deeply nested JSON if...

Assuming you use Jackson or Gson, you could define a POJO, which you can parse and iterate through like any other object public class Foo { String field1, field2; List<Foo> array1; public static...

View Article

How do I traverse through a deeply nested JSON if it has an indefinite...

For example I have the following JSON:{"field1": "value1","field2: "value2","array1" : ["field1": "value1","field2: "value2","array1" : ["field1": "value1","field2: "value2", ] ]}it could have more or...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images