Einhugur Serialization Framework for Xojo |
|
JSONSerializer.Serialize Method
Serialize's a class structure
Serialize(
item as Object,
rootName as String) as JSONNode
Parameters
- item
- The item to be serialized
- rootName
- Name of the root.
Returns
- JSONNode
- Returns JSONNode with the serialized class structure.
Remarks
All classes that are serialized must have a default constructor that has no parameters.
// Serialize our data
// ------------------------------------------------------------------
Dim s as JSONSerialization.JSONSerializer = new JSONSerialization.JSONSerializer()
Dim jsonDoc as JSONNode = s.Serialize(facility1,"Facility")
// ------------------------------------------------------------------
See Also
JSONSerializer Class