The main service is deserialize
.
serialization :: Deserializer :: deserialize
Deserialize and return an object, storing errors in the attributeerrors
serialization :: Deserializer :: deserialize_attribute
Deserialize the attribute withname
from the object open for deserialization
serialization :: Deserializer :: deserialize_attribute_missing
Was the attribute queried by the last call todeserialize_attribute
missing?
serialization :: Deserializer :: deserialize_attribute_missing=
Was the attribute queried by the last call todeserialize_attribute
missing?
serialization :: Deserializer :: deserialize_class
Deserialize the next available object as an instance ofclass_name
serialization :: Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
serialization :: Deserializer :: errors
Errors encountered in the last call todeserialize
serialization :: Deserializer :: errors=
Errors encountered in the last call todeserialize
serialization :: Deserializer :: keep_going
Shouldself
keep trying to deserialize an object after an error?
serialization :: Deserializer :: keep_going=
Shouldself
keep trying to deserialize an object after an error?
serialization :: Deserializer :: notify_of_creation
Register a newly allocated object (even if not completely built)serialization $ Deserializer :: SELF
Type of this instance, automatically specialized in every classmore_collections :: more_collections $ Deserializer :: core_serialize_to
Actual serialization ofself
to serializer
geometry :: points_and_lines $ Deserializer :: core_serialize_to
Actual serialization ofself
to serializer
bucketed_game :: bucketed_game $ Deserializer :: core_serialize_to
Actual serialization ofself
to serializer
noise :: noise $ Deserializer :: core_serialize_to
Actual serialization ofself
to serializer
serialization :: safe $ Deserializer :: deserialize_class
Deserialize the next available object as an instance ofclass_name
nitcc_runtime :: nitcc_runtime $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
nitcorn :: http_request $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
noise :: noise $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
msgpack :: ext $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
parser_base :: parser_base $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
json :: error $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
more_collections :: more_collections $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
geometry :: points_and_lines $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
a_star :: a_star $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
serialization :: custom_serialization $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
nitcorn :: http_response $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
github :: loader $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
bucketed_game :: bucketed_game $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
popcorn :: pop_tracker $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
nitcorn :: restful_annot $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
neo4j :: error $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
curl :: curl_rest $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
mpi :: mpi_simple $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
github :: api $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
github :: events $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
popcorn :: pop_repos $ Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
bucketed_game :: bucketed_game $ Deserializer :: from_deserializer
Create an instance of this class from thedeserializer
geometry :: points_and_lines $ Deserializer :: from_deserializer
Create an instance of this class from thedeserializer
noise :: noise $ Deserializer :: from_deserializer
Create an instance of this class from thedeserializer
more_collections :: more_collections $ Deserializer :: from_deserializer
Create an instance of this class from thedeserializer
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePackserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
core :: Object :: defaultinit
serialization :: Deserializer :: deserialize
Deserialize and return an object, storing errors in the attributeerrors
serialization :: Deserializer :: deserialize_attribute
Deserialize the attribute withname
from the object open for deserialization
serialization :: Deserializer :: deserialize_attribute_missing
Was the attribute queried by the last call todeserialize_attribute
missing?
serialization :: Deserializer :: deserialize_attribute_missing=
Was the attribute queried by the last call todeserialize_attribute
missing?
serialization :: Deserializer :: deserialize_class
Deserialize the next available object as an instance ofclass_name
serialization :: Deserializer :: deserialize_class_intern
Generated service to deserialize the next available object as an instance ofclass_name
serialization :: Deserializer :: errors
Errors encountered in the last call todeserialize
serialization :: Deserializer :: errors=
Errors encountered in the last call todeserialize
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: Deserializer :: keep_going
Shouldself
keep trying to deserialize an object after an error?
serialization :: Deserializer :: keep_going=
Shouldself
keep trying to deserialize an object after an error?
serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arrayserialization :: Deserializer :: notify_of_creation
Register a newly allocated object (even if not completely built)core :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
Serializer::serialize
serialization :: SafeDeserializer
Deserialization engine limiting which types can be deserializedmsgpack :: MsgPackDeserializer
Deserialize MessagePack format to full Nit objects
# Abstract deserialization service
#
# The main service is `deserialize`.
abstract class Deserializer
# Deserialize and return an object, storing errors in the attribute `errors`
#
# If a `static_type` is given, only subtypes of the `static_type` are accepted.
#
# This method behavior varies according to the implementation engines.
fun deserialize(static_type: nullable String): nullable Object is abstract
# Deserialize the attribute with `name` from the object open for deserialization
#
# The `static_type` restricts what kind of object can be deserialized.
#
# Return the deserialized value or null on error, and set
# `deserialize_attribute_missing` to whether the attribute was missing.
#
# Internal method to be implemented by the engines.
fun deserialize_attribute(name: String, static_type: nullable String): nullable Object is abstract
# Was the attribute queried by the last call to `deserialize_attribute` missing?
var deserialize_attribute_missing = false
# Register a newly allocated object (even if not completely built)
#
# Internal method called by objects in creation, to be implemented by the engines.
fun notify_of_creation(new_object: Object) is abstract
# Deserialize the next available object as an instance of `class_name`
#
# Return the deserialized object on success and
# record in `errors` if `class_name` is unknown.
#
# This method should be redefined for each custom subclass of `Serializable`.
# All refinement should look for a precise `class_name` and call super
# on unsupported classes.
protected fun deserialize_class(class_name: Text): nullable Object do
if class_name == "Error" then return new Error.from_deserializer(self)
return deserialize_class_intern(class_name)
end
# Generated service to deserialize the next available object as an instance of `class_name`
#
# Refinements to this method will be generated by the serialization phase.
# To avoid conflicts, there should not be any other refinements to this method.
# You can instead use `deserialize_class`.
protected fun deserialize_class_intern(class_name: Text): nullable Object do
errors.add new Error("Deserialization Error: Doesn't know how to deserialize class \"{class_name}\"")
return null
end
# Should `self` keep trying to deserialize an object after an error?
#
# This behavior takes effect after each attribute deserialization with
# errors such as a missing attribute or the value is of the wrong type.
# If `keep_going`, the attribute will be skipped but the engine will
# deserialize the next attribute.
# If `not keep_going`, the engine stops deserializing right away.
#
# When at `true`, this may cause the accumulation of a lot of entries in `errors`.
#
# Default at `true`.
var keep_going: nullable Bool = null is writable
# Errors encountered in the last call to `deserialize`
var errors = new Array[Error]
end
lib/serialization/serialization_core.nit:107,1--174,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class(name)
do
if name == "POSet[String]" then return new POSet[String].from_deserializer(self)
if name == "POSetElement[String]" then return new POSetElement[String].from_deserializer(self)
if name == "HashSet[String]" then return new HashSet[String].from_deserializer(self)
if name == "HashMap[String, POSetElement[String]]" then return new HashMap[String, POSetElement[String]].from_deserializer(self)
return super
end
end
lib/serialization/safe.nit:99,1--109,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3
redef class Deserializer
redef fun deserialize_class_intern(name) do abort
end
1,1--3,3