Class JsonInputParser.JsonInputConverter

    • Constructor Detail

      • JsonInputConverter

        public JsonInputConverter()
    • Method Detail

      • toInteger

        public int toInteger​(com.jsoniter.any.Any data)
                      throws java.io.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to integer.
        Specified by:
        toInteger in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to byte.
        Specified by:
        toByte in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to long.
        Specified by:
        toLong in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to short.
        Specified by:
        toShort in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to String.
        Specified by:
        toString in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to double.
        Specified by:
        toDouble in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to float.
        Specified by:
        toFloat in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to Boolean.
        Specified by:
        toBoolean in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to an integer array.
        Specified by:
        toIntegerArray in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to a String array.
        Specified by:
        toStringArray in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to a double array.
        Specified by:
        toDoubleArray in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to a byte array.
        Specified by:
        toByteArray in interface InputParser.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.IOException
        Description copied from interface: InputParser.InputConverter
        Converts parsed data returned by InputParser.ParseResult to an object. [fallback dummy]
        Specified by:
        toObject in interface InputParser.InputConverter<com.jsoniter.any.Any>
        Parameters:
        data - the obtained data
        Returns:
        the converted double array
        Throws:
        java.io.IOException - if conversion fails