Answer the question
In order to leave comments, you need to log in
How to parse json response in java?
Hello,
I would like to know what is the most convenient way to parse responses that come in json format?
There is an API interface that returns information on objects (something about 1000+ objects). I only need id and a couple of values in these objects. I understand that you need to parse and write down everything in iterations, but I don’t fully understand how this can be done in practice.
By the way, in java, it turned out to send get requests, and write the response to a string variable, but it seems to be easier to parse json than a string of several thousand characters.
Answer the question
In order to leave comments, you need to log in
To solve my problem, I chose the old json-simple.
I advise you to study the structure of Json files before parsing
There are many different ways. The choice of the most suitable one depends on how you receive this response and where.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question