Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

spring boot - Easy way to read a nested dynamic JSON using java

I'm used to develop using javascript and now I got a project to work with Java, is there an easy way to read nested dynamic JSON in Java without having to create an extra class for every single object? My example is like this:

JsonNode response = client.request(url);

and I need to perform some checks on the response, so I'll need to create something like:

if(response.children.length > 0 && response.error == null) ...

I'm using springboot, not sure if it helps somehow. Thank you in advance!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...