Class ConfigurationDeserializer

java.lang.Object
org.openhab.core.config.core.ConfigurationDeserializer
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Configuration>

public class ConfigurationDeserializer extends Object implements com.google.gson.JsonDeserializer<Configuration>
Deserializes a Configuration object. As opposed to Gson's default behavior, it ensures that all numbers are represented as BigDecimals.
Author:
Simon Kaufmann - Initial contribution, Ana Dimova - added a deserializer for the configuration, conforming to the automation json format
  • Constructor Details

    • ConfigurationDeserializer

      public ConfigurationDeserializer()
  • Method Details

    • deserialize

      public Configuration deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<Configuration>
      Throws:
      com.google.gson.JsonParseException