Class JsonToStringXContentParser

java.lang.Object
org.opensearch.core.xcontent.AbstractXContentParser
org.opensearch.common.xcontent.JsonToStringXContentParser
All Implemented Interfaces:
Closeable, AutoCloseable, org.opensearch.core.xcontent.XContentParser

public class JsonToStringXContentParser extends org.opensearch.core.xcontent.AbstractXContentParser
JsonToStringParser is the main parser class to transform JSON into stringFields in a XContentParser returns XContentParser with one parent field and subfields fieldName, fieldName._value, fieldName._valueAndPath
Opensearch.internal:
  • Constructor Details

    • JsonToStringXContentParser

      public JsonToStringXContentParser(org.opensearch.core.xcontent.NamedXContentRegistry xContentRegistry, org.opensearch.core.xcontent.DeprecationHandler deprecationHandler, org.opensearch.core.xcontent.XContentParser parser, String fieldTypeName) throws IOException
      Throws:
      IOException
  • Method Details

    • parseObject

      public org.opensearch.core.xcontent.XContentParser parseObject() throws IOException
      Throws:
      IOException
    • removeKeyOfNullValue

      public void removeKeyOfNullValue()
    • contentType

      public org.opensearch.core.xcontent.MediaType contentType()
    • nextToken

      public org.opensearch.core.xcontent.XContentParser.Token nextToken() throws IOException
      Throws:
      IOException
    • skipChildren

      public void skipChildren() throws IOException
      Throws:
      IOException
    • currentToken

      public org.opensearch.core.xcontent.XContentParser.Token currentToken()
    • currentName

      public String currentName() throws IOException
      Throws:
      IOException
    • text

      public String text() throws IOException
      Throws:
      IOException
    • charBuffer

      public CharBuffer charBuffer() throws IOException
      Throws:
      IOException
    • objectText

      public Object objectText() throws IOException
      Throws:
      IOException
    • objectBytes

      public Object objectBytes() throws IOException
      Throws:
      IOException
    • hasTextCharacters

      public boolean hasTextCharacters()
    • textCharacters

      public char[] textCharacters() throws IOException
      Throws:
      IOException
    • textLength

      public int textLength() throws IOException
      Throws:
      IOException
    • textOffset

      public int textOffset() throws IOException
      Throws:
      IOException
    • numberValue

      public Number numberValue() throws IOException
      Throws:
      IOException
    • numberType

      public org.opensearch.core.xcontent.XContentParser.NumberType numberType() throws IOException
      Throws:
      IOException
    • binaryValue

      public byte[] binaryValue() throws IOException
      Throws:
      IOException
    • getTokenLocation

      public org.opensearch.core.xcontent.XContentLocation getTokenLocation()
    • doBooleanValue

      protected boolean doBooleanValue() throws IOException
      Specified by:
      doBooleanValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • doShortValue

      protected short doShortValue() throws IOException
      Specified by:
      doShortValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • doIntValue

      protected int doIntValue() throws IOException
      Specified by:
      doIntValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • doLongValue

      protected long doLongValue() throws IOException
      Specified by:
      doLongValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • doFloatValue

      protected float doFloatValue() throws IOException
      Specified by:
      doFloatValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • doDoubleValue

      protected double doDoubleValue() throws IOException
      Specified by:
      doDoubleValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • doBigIntegerValue

      protected BigInteger doBigIntegerValue() throws IOException
      Specified by:
      doBigIntegerValue in class org.opensearch.core.xcontent.AbstractXContentParser
      Throws:
      IOException
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface org.opensearch.core.xcontent.XContentParser
      Specified by:
      isClosed in class org.opensearch.core.xcontent.AbstractXContentParser
    • close

      public void close() throws IOException
      Throws:
      IOException