Package io.prestosql.operator.scalar
Class JsonExtract.ObjectFieldJsonExtractor<T>
- java.lang.Object
-
- io.prestosql.operator.scalar.JsonExtract.ObjectFieldJsonExtractor<T>
-
- All Implemented Interfaces:
JsonExtract.JsonExtractor<T>
- Enclosing class:
- JsonExtract
public static class JsonExtract.ObjectFieldJsonExtractor<T> extends Object implements JsonExtract.JsonExtractor<T>
-
-
Constructor Summary
Constructors Constructor Description ObjectFieldJsonExtractor(String fieldName, JsonExtract.JsonExtractor<? extends T> delegate)
ObjectFieldJsonExtractor(String fieldName, JsonExtract.JsonExtractor<? extends T> delegate, boolean exceptionOnOutOfBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
extract(com.fasterxml.jackson.core.JsonParser jsonParser)
Executes the extraction on the existing content of the JsonParser and outputs the match.T
processJsonArray(com.fasterxml.jackson.core.JsonParser jsonParser)
T
processJsonObject(com.fasterxml.jackson.core.JsonParser jsonParser)
-
-
-
Constructor Detail
-
ObjectFieldJsonExtractor
public ObjectFieldJsonExtractor(String fieldName, JsonExtract.JsonExtractor<? extends T> delegate)
-
ObjectFieldJsonExtractor
public ObjectFieldJsonExtractor(String fieldName, JsonExtract.JsonExtractor<? extends T> delegate, boolean exceptionOnOutOfBounds)
-
-
Method Detail
-
extract
public T extract(com.fasterxml.jackson.core.JsonParser jsonParser) throws IOException
Description copied from interface:JsonExtract.JsonExtractor
Executes the extraction on the existing content of the JsonParser and outputs the match. Notes:- JsonParser must be on the FIRST token of the value to be processed when extract is called
- INVARIANT: when extract() returns, the current token of the parser will be the LAST token of the value
- Specified by:
extract
in interfaceJsonExtract.JsonExtractor<T>
- Returns:
- the value, or null if not applicable
- Throws:
IOException
-
processJsonObject
public T processJsonObject(com.fasterxml.jackson.core.JsonParser jsonParser) throws IOException
- Throws:
IOException
-
processJsonArray
public T processJsonArray(com.fasterxml.jackson.core.JsonParser jsonParser) throws IOException
- Throws:
IOException
-
-