Interface DeserializationContext

All Known Implementing Classes:
ProtoRpcSerializer

public interface DeserializationContext
  • Method Summary

    Modifier and Type
    Method
    Description
    com.inductiveautomation.ignition.common.gson.JsonElement
    Attempts to decode the supplied Value to JSON, using the following approach: Number/boolean/string/null values are mapped to equivalent JSON primitives Binary data is returned as a base64 encoded string primitive Maps are returned as JSON objects (if possible) Any other collection type is returned as a JSON array
    com.inductiveautomation.ignition.common.gson.Gson
     
    <T> T
    Attempts to decode the supplied Value as the implicit type T, using a deserializer keyed off identifier in the value.
    <T> T
    protoDecode(Value value, Class<T> clazz)
    Attempts to decode the supplied Value as the implicit type T, using a deserializer identified by the supplied class.
  • Method Details

    • gson

      com.inductiveautomation.ignition.common.gson.Gson gson()
    • protoDecode

      <T> T protoDecode(Value value) throws ProtoSerializationException
      Attempts to decode the supplied Value as the implicit type T, using a deserializer keyed off identifier in the value.
      Throws:
      ProtoSerializationException
    • protoDecode

      <T> T protoDecode(Value value, Class<T> clazz) throws ProtoSerializationException
      Attempts to decode the supplied Value as the implicit type T, using a deserializer identified by the supplied class.
      Throws:
      ProtoSerializationException
    • decodeToGson

      com.inductiveautomation.ignition.common.gson.JsonElement decodeToGson(Value value) throws ProtoSerializationException
      Attempts to decode the supplied Value to JSON, using the following approach:
      • Number/boolean/string/null values are mapped to equivalent JSON primitives
      • Binary data is returned as a base64 encoded string primitive
      • Maps are returned as JSON objects (if possible)
      • Any other collection type is returned as a JSON array
      Throws:
      ProtoSerializationException - if anything inside the Value could not be decoded to a JsonElement.
      See Also: