Package org.opensearch.common.xcontent
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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.XContentParser
org.opensearch.core.xcontent.XContentParser.NumberType, org.opensearch.core.xcontent.XContentParser.Token
-
Field Summary
Fields inherited from class org.opensearch.core.xcontent.AbstractXContentParser
DEFAULT_NUMBER_COERCE_POLICY
-
Constructor Summary
ConstructorDescriptionJsonToStringXContentParser
(org.opensearch.core.xcontent.NamedXContentRegistry xContentRegistry, org.opensearch.core.xcontent.DeprecationHandler deprecationHandler, org.opensearch.core.xcontent.XContentParser parser, String fieldTypeName) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
void
close()
org.opensearch.core.xcontent.MediaType
org.opensearch.core.xcontent.XContentParser.Token
protected BigInteger
protected boolean
protected double
protected float
protected int
protected long
protected short
org.opensearch.core.xcontent.XContentLocation
boolean
boolean
isClosed()
org.opensearch.core.xcontent.XContentParser.Token
org.opensearch.core.xcontent.XContentParser.NumberType
org.opensearch.core.xcontent.XContentParser
void
void
text()
char[]
int
int
Methods inherited from class org.opensearch.core.xcontent.AbstractXContentParser
bigIntegerValue, bigIntegerValue, booleanValue, charBufferOrNull, doubleValue, doubleValue, floatValue, floatValue, getDeprecationHandler, getXContentRegistry, intValue, intValue, isBooleanValue, list, listOrderedMap, longValue, longValue, map, map, mapOrdered, mapStrings, namedObject, readValue, shortValue, shortValue, textOrNull
-
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
- Throws:
IOException
-
removeKeyOfNullValue
public void removeKeyOfNullValue() -
contentType
public org.opensearch.core.xcontent.MediaType contentType() -
nextToken
- Throws:
IOException
-
skipChildren
- Throws:
IOException
-
currentToken
public org.opensearch.core.xcontent.XContentParser.Token currentToken() -
currentName
- Throws:
IOException
-
text
- Throws:
IOException
-
charBuffer
- Throws:
IOException
-
objectText
- Throws:
IOException
-
objectBytes
- Throws:
IOException
-
hasTextCharacters
public boolean hasTextCharacters() -
textCharacters
- Throws:
IOException
-
textLength
- Throws:
IOException
-
textOffset
- Throws:
IOException
-
numberValue
- Throws:
IOException
-
numberType
- Throws:
IOException
-
binaryValue
- Throws:
IOException
-
getTokenLocation
public org.opensearch.core.xcontent.XContentLocation getTokenLocation() -
doBooleanValue
- Specified by:
doBooleanValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
doShortValue
- Specified by:
doShortValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
doIntValue
- Specified by:
doIntValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
doLongValue
- Specified by:
doLongValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
doFloatValue
- Specified by:
doFloatValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
doDoubleValue
- Specified by:
doDoubleValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
doBigIntegerValue
- Specified by:
doBigIntegerValue
in classorg.opensearch.core.xcontent.AbstractXContentParser
- Throws:
IOException
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceorg.opensearch.core.xcontent.XContentParser
- Specified by:
isClosed
in classorg.opensearch.core.xcontent.AbstractXContentParser
-
close
- Throws:
IOException
-