String contents = readFileAsString(file);
You need to pass it to the function where you are reading the file and mapping the json to a variable.
String contents = readFileAsString(file);
You need to pass it to the function where you are reading the file and mapping the json to a variable.