Class DataRowJsonMapper


  • public class DataRowJsonMapper
    extends Object
    • Constructor Detail

      • DataRowJsonMapper

        public DataRowJsonMapper()
    • Method Detail

      • fromJson

        public static DataRow fromJson​(String in)
                                throws IOException,
                                       ParseException,
                                       com.fasterxml.jackson.core.JsonParseException,
                                       com.fasterxml.jackson.databind.JsonMappingException
        Initializes and returns a DataRow object based on the values provided in the given JSON String.
        Parameters:
        in - The JSON String
        Returns:
        the DataRow object created based on the JSOn String's content
        Throws:
        IOException
        ParseException
        com.fasterxml.jackson.core.JsonParseException
        com.fasterxml.jackson.databind.JsonMappingException
        Exception - Gets thrown in case the JSON could not be parsed / is invalid
      • fromJson

        public static DataRow fromJson​(String in,
                                       DataRow meta)
                                throws IOException,
                                       ParseException,
                                       com.fasterxml.jackson.core.JsonParseException,
                                       com.fasterxml.jackson.databind.JsonMappingException
        Initializes and returns a DataRow object based on the values provided in the given JSON String.
        Parameters:
        in - The JSON String
        meta - A DataRow that will be used to determine the field types if not given in the meta section of the JSON String
        Returns:
        the DataRow object created based on the JSOn String's content
        Throws:
        IOException
        ParseException
        com.fasterxml.jackson.core.JsonParseException
        com.fasterxml.jackson.databind.JsonMappingException
        Exception - Gets thrown in case the JSON could not be parsed / is invalid
      • metaDataFromJson

        public static DataRow metaDataFromJson​(String js)
                                        throws IOException,
                                               ParseException
        Parses and returns a DataRow object that contains meta data
        Parameters:
        in - The JSON String of the first row
        Returns:
        the DataRow object containing meta data created by parsing the first row
        Throws:
        ParseException
        IOException