Interface DeserializationContext
public interface DeserializationContext
Context for deserialization used when deserializing data with a
PersistentSerializer
.-
Method Summary
Modifier and TypeMethodDescriptiondefault PersistentData
Deserialize the given bytes into aPersistentData
object using the specified flavor key.default PersistentData
Deserialize the given JSON string into aPersistentData
object using the specified flavor key.default PersistentData
fromJsonElement
(com.inductiveautomation.ignition.common.gson.JsonElement jsonElement, String flavorKey) Deserialize the given JSON element into aPersistentData
object using the specified flavor key.default PersistentData
fromProtoMessage
(com.google.protobuf.Message message, String flavorKey) Deserialize the given Proto Message object into aPersistentData
object using the specified flavor key.
-
Method Details
-
fromBytes
Deserialize the given bytes into aPersistentData
object using the specified flavor key.- Parameters:
bytes
- The bytes 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.
-
fromJson
Deserialize the given JSON string into aPersistentData
object 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 aPersistentData
object using the specified flavor key.- Parameters:
jsonElement
- The JSON element 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.
-
fromProtoMessage
default PersistentData fromProtoMessage(com.google.protobuf.Message message, String flavorKey) throws DeserializeException Deserialize the given Proto Message object into aPersistentData
object using the specified flavor key.- Parameters:
message
- The Proto Message object 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.
-