Issue
I have a wikidata json file, and I want to read it into a JSONArray so that I could iterate over its items and get each element's properties and values. How can I do it? I tried iterating over the whole text and parsing each line, but it is too long and complicated for a large file, and I can't get It right that way. Is there more efficient way in Java for reading a JSON file into a JSON array or object so that I could iterate over its items?
Solution
A good solution is to use a library for this job. Very good library is the gson . You can read the documentation of the library here.
Answered By - karvoynistas