dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/NspAnalyzer.java
/**
     * Processes a part of package.json (as defined by JsonArray) and update
     * the specified dependency with relevant info.
     *
     * @param dependency the Dependency to update
     * @param jsonArray the jsonArray to parse
     * @param depType the dependency type
     */
Processes a part of package.json (as defined by JsonArray) and update
the specified dependency with relevant info.

@param dependency the Dependency to update
@param jsonArray the jsonArray to parse
@param depType the dependency type
Processes a part of package . json ( as defined by JsonArray ) and update the specified dependency with relevant info . @param dependency the Dependency to update @param jsonArray the jsonArray to parse @param depType the dependency type
private void processPackage(Dependency dependency, JsonArray jsonArray, String depType) {
        JsonObjectBuilder builder = Json.createObjectBuilder();
        for (JsonString str : jsonArray.getValuesAs(JsonString.class)) {
            builder.add(str.toString(), "");
        }
        JsonObject jsonObject = builder.build();
        processPackage(dependency, jsonObject, depType);
    }
private void processPackage ( Dependency dependency , JsonArray jsonArray , String depType ) { JsonObjectBuilder builder = Json . createObjectBuilder ( ) ; for ( JsonString str : jsonArray . getValuesAs ( JsonString . class ) ) { builder . add ( str . toString ( ) , "" ) ; } JsonObject jsonObject = builder . build ( ) ; processPackage ( dependency , jsonObject , depType ) ; }
Processes a part of package.json (as defined by JsonArray) and update
 the specified dependency with relevant info.
Processes a part of package . json ( as defined by JsonArray ) and update the specified dependency with relevant info .