static JSONObject getResourceFileJson()

in source/src/main/java/com/amazonaws/comprehend/esproxy/lambda/utils/kibana/KibanaHelper.java [90:100]


    static JSONObject getResourceFileJson(@NonNull String resourceFileName) throws IOException {
        if (resourceMap.containsKey(resourceFileName)) return resourceMap.get(resourceFileName);

        InputStream newMappingInputStream = KibanaHelper.class.getClassLoader()
                .getResourceAsStream(String.format("%s.json", resourceFileName));
        if (newMappingInputStream == null) throw new IOException();

        JSONObject fileJson = new JSONObject(IOUtils.toString(newMappingInputStream));
        resourceMap.put(resourceFileName, fileJson);
        return fileJson;
    }