Class JsonReader


  • public class JsonReader
    extends JsonBase
    Maps a received JSON value into the required SmartGridready JSON output value. The timestamps are converted to a canonical format first and afterwards.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  JsonReader.Key
      Implements a map key.
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonReader​(java.util.Map<java.lang.String,​java.lang.String> keywordMapInput)
      Constructs a new instance.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<JsonReader.Key,​java.util.Map<java.lang.String,​java.lang.Object>> mapToFlatList​(java.lang.String jsonFile, java.util.Map<java.lang.String,​java.lang.String> keywordMap)
      Converts a JSON string to a data structure of key-value pairs, using a keyword map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonReader

        public JsonReader​(java.util.Map<java.lang.String,​java.lang.String> keywordMapInput)
        Constructs a new instance.
        Parameters:
        keywordMapInput - the keyword map
    • Method Detail

      • mapToFlatList

        public static java.util.Map<JsonReader.Key,​java.util.Map<java.lang.String,​java.lang.Object>> mapToFlatList​(java.lang.String jsonFile,
                                                                                                                               java.util.Map<java.lang.String,​java.lang.String> keywordMap)
                                                                                                                        throws com.fasterxml.jackson.core.JsonProcessingException
        Converts a JSON string to a data structure of key-value pairs, using a keyword map.
        Parameters:
        jsonFile - the JSON input
        keywordMap - the keyword map
        Returns:
        a map of key-value pairs
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if parsing failed