Interface DeserializationContext
public interface DeserializationContext
Context for deserialization used when deserializing data with a
PersistentSerializer.-
Method Summary
Modifier and TypeMethodDescriptiondefault PersistentDataDeserialize the given bytes into aPersistentDataobject using the specified flavor key.default PersistentDataDeserialize the given JSON string into aPersistentDataobject using the specified flavor key.default PersistentDatafromJsonElement(com.inductiveautomation.ignition.common.gson.JsonElement jsonElement, String flavorKey) Deserialize the given JSON element into aPersistentDataobject using the specified flavor key.default PersistentDatafromProtoMessage(com.google.protobuf.Message message, String flavorKey) Deserialize the given Proto Message object into aPersistentDataobject using the specified flavor key.
-
Method Details
-
fromBytes
Deserialize the given bytes into aPersistentDataobject using the specified flavor key.- Parameters:
bytes- The bytes to deserialize.flavorKey- The flavor key to use for deserialization.- Returns:
- A
PersistentDataobject representing the deserialized data. - Throws:
DeserializeException- If an error occurs during deserialization.
-
fromJson
Deserialize the given JSON string into aPersistentDataobject using the specified flavor key.- Parameters:
json- The JSON string to deserialize.flavorKey- The flavor key to use for deserialization.- Returns:
- A PersistentData object representing the deserialized data.
- Throws:
DeserializeException- If an error occurs during deserialization.
-
fromJsonElement
default PersistentData fromJsonElement(com.inductiveautomation.ignition.common.gson.JsonElement jsonElement, String flavorKey) throws DeserializeException Deserialize the given JSON element into aPersistentDataobject using the specified flavor key.- Parameters:
jsonElement- The JSON element to deserialize.flavorKey- The flavor key to use for deserialization.- Returns:
- A
PersistentDataobject representing the deserialized data. - Throws:
DeserializeException- If an error occurs during deserialization.
-
fromProtoMessage
default PersistentData fromProtoMessage(com.google.protobuf.Message message, String flavorKey) throws DeserializeException Deserialize the given Proto Message object into aPersistentDataobject using the specified flavor key.- Parameters:
message- The Proto Message object to deserialize.flavorKey- The flavor key to use for deserialization.- Returns:
- A
PersistentDataobject representing the deserialized data. - Throws:
DeserializeException- If an error occurs during deserialization.
-