Quantcast
Channel: How to get deeply nested JSON object in Java - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Nikolai Shevchenko for How to get deeply nested JSON object in Java

It's super easy with JsonPath.String ruleId = JsonPath.read(jsonString, "$.response.response.match.matches.matchesSchema.rules[0].ruleId");Or if you read the path multiple times, it's better to...

View Article



Answer by Fana Sithole for How to get deeply nested JSON object in Java

You can use Jackson's JsonNode with JsonPath to get ruleId as follows:ObjectMapper mapper = new ObjectMapper();JsonNode jsonObj = mapper.readTree(JSONString);String lat =...

View Article

How to get deeply nested JSON object in Java

I have a JSON string where i want to get the value of one field which is nested in multiple objects. How can I get that field in a nice and performant way? Here's the code I tried so far. It's working,...

View Article
Browsing all 3 articles
Browse latest View live


Latest Images