I have a very simple JSON with reviews for products, like:
{
\"reviewerID\": \"A2XVJBSRI3SWDI\",
\"asin\": \"0000031887\",
\"reviewerName\": \"abigai
In case you need to parse it from a file, I find the best solution to use a HashMap to use it inside your java code for better manipultion.
Try out this code:
public HashMap myMethodName() throws FileNotFoundException
{
String path = "absolute path to your file";
BufferedReader bufferedReader = new BufferedReader(new FileReader(path));
Gson gson = new Gson();
HashMap json = gson.fromJson(bufferedReader, HashMap.class);
return json;
}