org.apache.tinkerpop.gremlin.structure.io.graphson

## Class JsonParserConcat

- java.lang.Object
- - JsonParserSequence
  - - org.apache.tinkerpop.gremlin.structure.io.graphson.JsonParserConcat

-     public class JsonParserConcat
      extends JsonParserSequence

  Utility class to easily concatenate multiple JsonParsers. This class had to be implemented because the class it is extending, `JsonParserSequence`, inevitably skips a token when switching from one empty parser to a new one. I.e. it is automatically calling `JsonParser#nextToken()` when switching to the new parser, ignoring the current token. This class is used for high performance in GraphSON when trying to detect types.
  Author:
    Kevin Gallardo (https://kgdo.me)

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JsonParserConcat(JsonParser[] parsers)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JsonParserConcat` | `createFlattened(JsonParser first, JsonParser second)`
    `JsonToken` | `nextToken()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JsonParserConcat

          protected JsonParserConcat(JsonParser[] parsers)

  - ### Method Detail

    - #### createFlattened

          public static JsonParserConcat createFlattened(JsonParser first,
                                                         JsonParser second)

    - #### nextToken

          public JsonToken nextToken()
                              throws IOException,
                                     JsonParseException

      Throws:
        `IOException`
        `JsonParseException`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.