I am trying to read a JSON file like this:
{
\"presentationName\" : \"Here some text\",
\"presentationAutor\" : \"Here some text\",
\"presentationSlide
For Gson you can paste your json file here : https://www.freecodeformat.com/json2pojo.php Create appropriate pojo classes and then use this code :
Gson gson = new Gson();
try (Reader reader = new FileReader("pathToYourFile.json")) {
// Convert JSON File to Java Object
Root root = gson.fromJson(reader, Root.class);
// print staff you need
System.out.println(root.getCommands().get(0).getName());
} catch (IOException e) {
e.printStackTrace();
}