Class JsonArrayFixingInputStream

java.lang.Object
java.io.InputStream
org.owasp.dependencycheck.utils.JsonArrayFixingInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class JsonArrayFixingInputStream extends InputStream
Fixes a poorly formatted jSON array such as those returned by go list -json -m all.

Example:

{ "name1": "value" } { "name2" : "value" } Would be transformed into: [{ "name1": "value" }, { "name2" : "value" }]

Note that this is a naive implementation and will incorrectly transform a stream if there are '}' contained within the names of values.

Author:
Jeremy Long