Einhugur JSON III Serialization Framework for Xojo

JSONSerializerIII.Serialize Method

Serialize's a class structure

Serialize(
   item as Object,
   rootName as String) as JSONDocument

Parameters

item
The item to be serialized
rootName
Name of the root. This can be empty string if package root is not named.

Returns

JSONDocument
Returns JSON document with the serialized class structure.

Remarks

All classes that are serialized must have a default constructor that has no parameters.


// Serialize our data
// ------------------------------------------------------------------
var s as JSONSerializationIII.JSONSerializerIII = new JSONSerializationIII.JSONSerializerIII()
var doc as EinhugurJSONIII.JSONDocument = s.Serialize(facility1,"Facility")
// ------------------------------------------------------------------



This method can throw SerializationException.

See Also

JSONSerializerIII Class