Abstract
Static
deserializeReturns a FUDGE-object reconstructed from the information in the Serialization given, including attached components, children, superclass-objects
Static
deserializeReturns an Array of FUDGE-objects reconstructed from the information in the array of Serializations given, including attached components, children, superclass-objects
Static
getStatic
parseReturns a Serialization created from the given JSON-String. Result may be passed to Serializer.deserialize
Static
prettifyStatic
reconstructCreates an object of the class defined with the full path including the namespaceName(s) and the className seperated by dots(.)
Static
registerRegisters a namespace to the Serializer, to enable automatic instantiation of classes defined within
Static
serializeReturns a javascript object representing the serializable FUDGE-object given, including attached components, children, superclass-objects all information needed for reconstruction
An object to serialize, implementing the Serializable interface
Static
serializeReturns an Array of javascript object representing the serializable FUDGE-objects given in the array, including attached components, children, superclass-objects all information needed for reconstruction
Static
stringifyReturns a formatted, human readable JSON-String, representing the given Serialization that may have been created by Serializer.serialize
Handles the external serialization and deserialization of Serializable objects. The internal process is handled by the objects themselves.
A Serialization object can be created from a Serializable object and a JSON-String may be created from that.
Vice versa, a JSON-String can be parsed to a Serialization which can be deserialized to a Serializable object.
While the internal serialize/deserialize method1s of the objects care of the selection of information needed to recreate the object and its structure,
the Serializer keeps track of the namespaces and classes in order to recreate Serializable objects. The general structure of a Serialization is as follows
Since the instance of the superclass is created automatically when an object is created, the SerializationOfSuperClass omits the the namespaceName.className key and consists only of its value. The constructorNameOfSuperclass is given instead as a property name in the serialization of the subclass.