value
is serializedThe default behavior is to call value.core_serialize_to(self)
but it
can be redefined by a custom serializer to add domain-specific serialization behavior.
# The method is called when a standard `value` is serialized
#
# The default behavior is to call `value.core_serialize_to(self)` but it
# can be redefined by a custom serializer to add domain-specific serialization behavior.
fun serialize_core(value: Serializable)
do
value.core_serialize_to(self)
end
lib/serialization/serialization_core.nit:93,2--100,4
# This method is called to generate the attributes of a serialized representation
redef fun serialize_core(value)
do
super
if value isa E then
# Inject additional special domain-specific information
serialize_attribute("more-data", value.phantom)
end
end
lib/serialization/examples/custom_serialization.nit:93,2--102,4