class JsonReader {

    private LicenseInformation mapLicenses(String identifier, JsonObject licenseDataObj) {
        if (null != licenseDataObj) {
            JsonArray objs = (JsonArray) licenseDataObj.get(identifier);
            if (null != objs) {
                Spliterator<Object> tmp = objs.spliterator();
                Collection<String> licenses = StreamSupport.stream(tmp, false)
                        .map(obj -> (JsonObject) obj)
                        .map(obj -> (String) obj.get("licenseId"))
                        // We delete all special strings which can be used to convey information about missing licenses
                        .filter(licenseId -> !SPECIAL_INFORMATION.containsKey(licenseId))
                        .collect(Collectors.toSet());
                return LicenseSupport.mapLicenses(licenses);
            }
        }
        return new LicenseStatement();
    }

    public  JsonReader(Path recordingFile, Path dependencyDir, Charset encoding);

}