Class JsonInputParser.JsonInputConverter
- java.lang.Object
-
- de.iip_ecosphere.platform.connectors.parser.JsonInputParser.JsonInputConverter
-
- All Implemented Interfaces:
InputParser.InputConverter<com.jsoniter.any.Any>
- Enclosing class:
- JsonInputParser
public static final class JsonInputParser.JsonInputConverter extends java.lang.Object implements InputParser.InputConverter<com.jsoniter.any.Any>
Implements a JSON input converted.- Author:
- Holger Eichelberger, SSE
-
-
Constructor Summary
Constructors Constructor Description JsonInputConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleantoBoolean(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto Boolean.bytetoByte(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto byte.byte[]toByteArray(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto a byte array.doubletoDouble(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto double.double[]toDoubleArray(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto a double array.floattoFloat(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto float.inttoInteger(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto integer.int[]toIntegerArray(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto an integer array.longtoLong(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto long.java.lang.ObjecttoObject(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto an object.shorttoShort(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto short.java.lang.StringtoString(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto String.java.lang.String[]toStringArray(com.jsoniter.any.Any data)Converts parsed data returned byInputParser.ParseResultto a String array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.iip_ecosphere.platform.connectors.parser.InputParser.InputConverter
toDate, toEnum, toLocalDateTime
-
-
-
-
Method Detail
-
toInteger
public int toInteger(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto integer.- Specified by:
toIntegerin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted integer
- Throws:
java.io.IOException- if conversion fails
-
toByte
public byte toByte(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto byte.- Specified by:
toBytein interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted integer
- Throws:
java.io.IOException- if conversion fails
-
toLong
public long toLong(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto long.- Specified by:
toLongin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted long
- Throws:
java.io.IOException- if conversion fails
-
toShort
public short toShort(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto short.- Specified by:
toShortin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted long
- Throws:
java.io.IOException- if conversion fails
-
toString
public java.lang.String toString(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto String.- Specified by:
toStringin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted String
- Throws:
java.io.IOException- if conversion fails
-
toDouble
public double toDouble(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto double.- Specified by:
toDoublein interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted double
- Throws:
java.io.IOException- if conversion fails
-
toFloat
public float toFloat(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto float.- Specified by:
toFloatin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted float
- Throws:
java.io.IOException- if conversion fails
-
toBoolean
public boolean toBoolean(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto Boolean.- Specified by:
toBooleanin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted Boolean
- Throws:
java.io.IOException- if conversion fails
-
toIntegerArray
public int[] toIntegerArray(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto an integer array.- Specified by:
toIntegerArrayin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted integer array
- Throws:
java.io.IOException- if conversion fails
-
toStringArray
public java.lang.String[] toStringArray(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto a String array.- Specified by:
toStringArrayin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted integer array
- Throws:
java.io.IOException- if conversion fails
-
toDoubleArray
public double[] toDoubleArray(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto a double array.- Specified by:
toDoubleArrayin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted double array
- Throws:
java.io.IOException- if conversion fails
-
toByteArray
public byte[] toByteArray(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto a byte array.- Specified by:
toByteArrayin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted double array
- Throws:
java.io.IOException- if conversion fails
-
toObject
public java.lang.Object toObject(com.jsoniter.any.Any data) throws java.io.IOExceptionDescription copied from interface:InputParser.InputConverterConverts parsed data returned byInputParser.ParseResultto an object. [fallback dummy]- Specified by:
toObjectin interfaceInputParser.InputConverter<com.jsoniter.any.Any>- Parameters:
data- the obtained data- Returns:
- the converted double array
- Throws:
java.io.IOException- if conversion fails
-
-