Class JsonInputParser
java.lang.Object
de.iip_ecosphere.platform.connectors.parser.JsonInputParser
- All Implemented Interfaces:
InputParser<de.iip_ecosphere.platform.support.json.JsonIterator>
@MachineParser
public final class JsonInputParser
extends Object
implements InputParser<de.iip_ecosphere.platform.support.json.JsonIterator>
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 ClassesModifier and TypeClassDescriptionstatic final classImplements a JSON input converter.static final classDefines a parse result instance for JSON.private static final classEmulates 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
FieldsFields inherited from interface de.iip_ecosphere.platform.connectors.parser.InputParser
SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a type converter for parsed data.parse(byte[] data) Parses a chunk of data received from a source.
-
Field Details
-
CONVERTER
-
-
Constructor Details
-
JsonInputParser
public JsonInputParser()
-
-
Method Details
-
parse
Description copied from interface:InputParserParses a chunk of data received from a source.- Specified by:
parsein interfaceInputParser<de.iip_ecosphere.platform.support.json.JsonIterator>- Parameters:
data- the data- Returns:
- parsing result
- Throws:
IOException- if parsing fails for some reasons
-
getConverter
Description copied from interface:InputParserReturns a type converter for parsed data.- Specified by:
getConverterin interfaceInputParser<de.iip_ecosphere.platform.support.json.JsonIterator>- Returns:
- the type converter
-