Created
May 6, 2014 14:33
-
-
Save azakordonets/48b4f885ae18112d885e to your computer and use it in GitHub Desktop.
This method allows you to read from file (where already stored data in json format) and save it into JSON object.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static JSONObject getJSONFromFile(String path) throws JSONException, IOException, ParseException { | |
JSONParser parser = new JSONParser(); | |
Object obj = parser.parse(new FileReader(path)); | |
return new JSONObject(obj.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment