Trying to use javax.json to read some json data. Currently I have no issues to read the file this way(exception handling skipped):
FileInputStream json = new FileInputStream("testJSON.json");
JsonParser parser = Json.createParser(json);
This works fine when I have a seperate json file, in this case it is testJSON.json. Now what I want to do is simply parse in the json string, instead of the json file. For example, I have a json string that looks like this:
[{"Gross Weight":"12","Tare Weight":"3","Price Per Pound":"2"},{"Gross Weight":"123","Tare Weight":"32","Price Per Pound":"23"}]
Is it possible to parse this json data to the JsonParser? Or any other Java library can handle this request?