src/main/java/org/a05annex/util/JsonSupport.java
@NotNull
    static public JSONObject readJsonFileAsJSONObject(@NotNull String filename) throws
            IOException, ParseException {
        JSONParser jsonParser = new JSONParser();
        FileReader reader = new FileReader(filename);
        //Read JSON file
        Object obj = jsonParser.parse(reader);
        return (JSONObject) obj;
    }
/**
     * Read a file into a {@link JSONObject}.
     *
     * @param filename The filename.
     * @return The {@link JSONObject} read from the file.
     * @throws FileNotFoundException if the named file does not exist,
     *                               is a directory rather than a regular file,
     *                               or for some other reason cannot be opened for
     * @throws IOException           Error reading from the file.
     * @throws ParseException        JSON format error in the file contents.
     * @throws ClassCastException    The contents of the JSON file is not a dictionary.
     */
Read a file into a  JSONObject.
@param filename The filename.
@return The  JSONObject read from the file.
@throws FileNotFoundException if the named file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
@throws IOException           Error reading from the file.
@throws ParseException        JSON format error in the file contents.
@throws ClassCastException    The contents of the JSON file is not a dictionary.
Read a file into a JSONObject . @param filename The filename . @return The JSONObject read from the file . @throws FileNotFoundException if the named file does not exist is a directory rather than a regular file or for some other reason cannot be opened for @throws IOException Error reading from the file . @throws ParseException JSON format error in the file contents . @throws ClassCastException The contents of the JSON file is not a dictionary .
@NotNull
    static public JSONObject readJsonFileAsJSONObject(@NotNull String filename) throws
            IOException, ParseException {
        JSONParser jsonParser = new JSONParser();
        FileReader reader = new FileReader(filename);
        Object obj = jsonParser.parse(reader);
        return (JSONObject) obj;
    }
@ NotNull static public JSONObject readJsonFileAsJSONObject ( @ NotNull String filename ) throws IOException , ParseException { JSONParser jsonParser = new JSONParser ( ) ; FileReader reader = new FileReader ( filename ) ; Object obj = jsonParser . parse ( reader ) ; return ( JSONObject ) obj ; }
Read a file into a {@link JSONObject}.
Read a file into a { @link JSONObject } .
//Read JSON file