0

Any suggestions for getting the JPATH's for the input JSON file. Basically a tree structure of the JSON schema from the JSON file

Sandeep Shetty
  • 147
  • 1
  • 9

1 Answers1

0

You should be okay to use JsonParser this way;

First, get the JSON file content as a String. (Say jsonString)
Then code something like this;

JsonParser parser = new JsonParser();
JsonObject o = parser.parse(jsonString).getAsJsonObject();

Once you have the JSON Object, you can use the JsonPath library to get what you may need.

Hope this helps!

Shivam Puri
  • 915
  • 7
  • 20