Package io.jmix.core
Interface EntityAttributeSerializationExtension
- All Known Implementing Classes:
FilterConditionAttributeSerializationExtension
public interface EntityAttributeSerializationExtension
An extension point for a mechanism to serialize and deserialize entity to JSON.
The mechanism is implemented in the
EntitySerialization
bean.
Such beans can be useful for defining specific serialization and deserialization logic for
a MetaProperty
value. The supported MetaProperty
is determined by the
supports(MetaProperty)
method.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson
(MetaProperty property, com.google.gson.JsonElement element) Deserializes a JSON element to meta property value.boolean
supports
(MetaProperty property) Checks whether the extension supports the given meta propertycom.google.gson.JsonElement
toJson
(MetaProperty property, Object propertyValue) Serializes a meta property value to JSON element
-
Method Details
-
supports
Checks whether the extension supports the given meta property- Parameters:
property
- a meta property- Returns:
- true if the extension supports the given meta property, or false otherwise
-
toJson
Serializes a meta property value to JSON element- Parameters:
property
- a meta propertypropertyValue
- a meta property value- Returns:
- a JSON element
-
fromJson
Deserializes a JSON element to meta property value.- Parameters:
property
- a meta propertyelement
- a JSON element- Returns:
- a meta property value
-