Class JsonInputParser
- java.lang.Object
-
- de.iip_ecosphere.platform.connectors.parser.JsonInputParser
-
- All Implemented Interfaces:
InputParser<com.jsoniter.any.Any>
@MachineParser public final class JsonInputParser extends java.lang.Object implements InputParser<com.jsoniter.any.Any>
Implements the default input parser for JSON data. Name-based access shall be rather fast, however, index-based access is currently a limited compromise. Warning: This implementation is not stable and may change during performance optimization.- Author:
- Holger Eichelberger, SSE
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonInputParser.JsonInputConverterImplements a JSON input converted.static classJsonInputParser.JsonParseResultDefines a parse result instance for JSON.private static classJsonInputParser.OneElementEntryIteratorEmulates a one-element entry "iterator".-
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.connectors.parser.InputParser
InputParser.InputConverter<T>, InputParser.ParseResult<T>
-
-
Field Summary
Fields Modifier and Type Field Description private static JsonInputParser.JsonInputConverterCONVERTERprivate static java.lang.Class<?>LAZY_ANY_CLSprivate static java.lang.reflect.FieldLAZY_ANY_HEAD_FIELDprivate static java.lang.reflect.FieldLAZY_ANY_TAIL_FIELD-
Fields inherited from interface de.iip_ecosphere.platform.connectors.parser.InputParser
SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description JsonInputParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonInputParser.JsonInputConvertergetConverter()Returns a type converter for parsed data.JsonInputParser.JsonParseResultparse(byte[] data)Parses a chunk of data received from a source.
-
-
-
Field Detail
-
CONVERTER
private static final JsonInputParser.JsonInputConverter CONVERTER
-
LAZY_ANY_CLS
private static final java.lang.Class<?> LAZY_ANY_CLS
-
LAZY_ANY_HEAD_FIELD
private static final java.lang.reflect.Field LAZY_ANY_HEAD_FIELD
-
LAZY_ANY_TAIL_FIELD
private static final java.lang.reflect.Field LAZY_ANY_TAIL_FIELD
-
-
Method Detail
-
parse
public JsonInputParser.JsonParseResult parse(byte[] data) throws java.io.IOException
Description copied from interface:InputParserParses a chunk of data received from a source.- Specified by:
parsein interfaceInputParser<com.jsoniter.any.Any>- Parameters:
data- the data- Returns:
- parsing result
- Throws:
java.io.IOException- if parsing fails for some reasons
-
getConverter
public JsonInputParser.JsonInputConverter getConverter()
Description copied from interface:InputParserReturns a type converter for parsed data.- Specified by:
getConverterin interfaceInputParser<com.jsoniter.any.Any>- Returns:
- the type converter
-
-