The operation classToJSON()
takes any object (anObject
) or array of objects and tries to map it to a JSON string aString
. If this is not possible, an error is raised.
JSON types and xUML types are mapped as listed on JSON Type Mapping.
classToJSON() does not support cyclic structures. When a cyclic structure is detected during serializing the given object, an exception will be thrown.
|