src/com/newrelic/metrics/publish/AgentFactory.java
/**
     * Read in JSON file from the provided filename.
     * Now deprecated and will be removed in a future release.
     * <p>
     * See {@link Config#getValue(String)} for using the new {@code plugin.json} configuration file.
     * @param filename the filename to read in
     * @return JSONArray the JSONArray that represents the JSON file
     * @throws ConfigurationException if an error occurs reading in or parsing the JSON file
     */
Read in JSON file from the provided filename.
Now deprecated and will be removed in a future release.
Read in JSON file from the provided filename . Now deprecated and will be removed in a future release .
@Deprecated
    public JSONArray readJSONFile(String filename) throws ConfigurationException {
        Object parseResult = null;
        File file = getConfigurationFile(filename);
        try {
            FileReader reader = new FileReader(file);
            JSONParser parser = new JSONParser();
            try {
                parseResult = parser.parse(reader);
            } catch (ParseException e) {
                throw logAndThrow("Error parsing config file " + file.getAbsolutePath());
            }
        } catch(IOException ioEx) {
            throw logAndThrow("Error reading config file " + file.getAbsolutePath());
        }
        JSONArray json = (JSONArray) parseResult;
        return json;
    }
@ Deprecated public JSONArray readJSONFile ( String filename ) throws ConfigurationException { Object parseResult = null ; File file = getConfigurationFile ( filename ) ; try { FileReader reader = new FileReader ( file ) ; JSONParser parser = new JSONParser ( ) ; try { parseResult = parser . parse ( reader ) ; } catch ( ParseException e ) { throw logAndThrow ( "Error parsing config file " + file . getAbsolutePath ( ) ) ; } } catch ( IOException ioEx ) { throw logAndThrow ( "Error reading config file " + file . getAbsolutePath ( ) ) ; } JSONArray json = ( JSONArray ) parseResult ; return json ; }
Read in JSON file from the provided filename.
Read in JSON file from the provided filename .