Interface DeserializationContext
- All Known Implementing Classes:
ProtoRpcSerializer
public interface DeserializationContext
-
Method Summary
Modifier and TypeMethodDescriptioncom.inductiveautomation.ignition.common.gson.JsonElement
decodeToGson
(Value value) 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 arraycom.inductiveautomation.ignition.common.gson.Gson
gson()
<T> T
protoDecode
(Value value) 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
Attempts to decode the supplied Value as the implicit type T, using a deserializer keyed off identifier in the value.- Throws:
ProtoSerializationException
-
protoDecode
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:
-