class PostmanService {

    public void parse(JsonParser parser, NewmanParsingResult result) throws IOException {
        if (!parser.isClosed() && parser.nextToken() == JsonToken.START_OBJECT) {
            log.debug("[json] JSON stream contains a root object: parsing the Newman report");
            parseRootObject(parser, result);
        } else {
            throw new IOException("JSON stream does not contain a root object: no Newman report to parse");
        }
    }

}