The serialisation package allows various object types to be converted to a string and back again.
In order to serialise an object type (i.e. a table with an associated metatable) then object type must be set in member __serialid prior to serialisation.
serialisation.deserialise |
( |
var |
s | ) |
|
Deserialise a string into an object representation.
- Parameters
-
s | - the (serialised) string representation of the object |
- Returns
- object (can be nil), true/false (success flag for nil case)
- Note
serialisation.serialise |
( |
var |
obj, |
|
|
var |
includeFunctions |
|
) |
| |
Serialise an instance of any type of object to a string representation.
- Parameters
-
obj | - the instance of the object |
includeFunctions | - whether functions should be serialised as well |
- Returns
- the string representation of the object
- Note