Class ConfigurationSerializer

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

public class ConfigurationSerializer extends Object implements com.google.gson.JsonSerializer<Configuration>
This class serializes elements of Configuration object into json as configuration object (not as configuration.properties object).
Author:
Yordan Mihaylov - Initial contribution, Ana Dimova - provide serialization of multiple configuration values., Sami Salonen - property names are sorted for serialization for minimal diffs
  • Constructor Details

    • ConfigurationSerializer

      public ConfigurationSerializer()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(Configuration src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Configuration>