public static List<GoModDependency> process(InputStream inputStream) throws AnalysisException {
        LOGGER.debug("Beginning go.mod processing");

        final List<GoModDependency> goModDependencies = new ArrayList<>();
        try (JsonArrayFixingInputStream jsonStream = new JsonArrayFixingInputStream(inputStream)) {
            final JsonReaderFactory factory = Json.createReaderFactory(null);
            try (JsonReader reader = factory.createReader(jsonStream, java.nio.charset.StandardCharsets.UTF_8)) {
                final JsonArray modules = reader.readArray();
                modules.getValuesAs(JsonObject.class).forEach((module) -> {
                    final String path = module.getString("Path");
                    String version = module.getString("Version", null);
                    if (version != null && version.startsWith("v")) {
                        version = version.substring(1);
                    }
                    String dir = null;
                    if (module.getJsonString("Dir") != null) {
                        dir = module.getString("Dir");
                    }
                    goModDependencies.add(new GoModDependency(path, version, dir));
                });
            }
        } catch (JsonParsingException jsonpe) {
            throw new AnalysisException("Error parsing output from `go list -json -m all`", jsonpe);
        } catch (JsonException jsone) {
            throw new AnalysisException("Error reading output from `go list -json -m all`", jsone);
        } catch (IllegalStateException ise) {
            throw new AnalysisException("Illegal state in go mod stream", ise);
        } catch (ClassCastException cce) {
            throw new AnalysisException("JSON not exactly matching output of `go list -json -m all`", cce);
        } catch (IOException ex) {
            throw new AnalysisException("Error reading output of `go list -json -m all`", ex);
        }
        return goModDependencies;
    }
@Test
    public void testProcess() throws Exception {
        InputStream inputStream = new ByteArrayInputStream(issue2891.getBytes());
        List<GoModDependency> expResult = null;
        List<GoModDependency> result = GoModJsonParser.process(inputStream);
        assertEquals(96, result.size());
    }