|
|
Progress.Lang.Object Deserialize (JsonArray)
|
/* Deserializes an array of object from a JSON array..
Integer values are references to objects in the array - if there are duplicates
then only one has to be (de)serialised. References must be 'backwards' (ie to an
already-deserialised object).
@param JsonArray An array represented as JSON
@return Progress.Lang.Object[] A deserialised object array */
|
|
|
Progress.Lang.Object Deserialize (JsonObject)
|
/* Deserializes this object from JSON.
@param JsonConstruct This object represented as JSON
@return Progress.Lang.Object A deserialised object */
|
|
|
OpenEdge.Core.Json.IJsonSerializer NewSerializableObject (Class)
|
/* Instantiates a new instance of an IJsonSerializable object.
This method attempts to find a service using the CCS Service Manager, using IJsonSerializable as
the service name, and the type name as an alias.
If none is found or returned, then the method requires that the type implement IJsonSerializable, be NEW'able
(not abstract and not an interface) and also have a public default constructor.
@param Progress.Lang.Class The type to instantiate
@return IJsonSerializer An object of that type */
|
|
|
Progress.Json.ObjectModel.JsonObject Serialize (Object)
|
/* Serialises an object to JSON.
This method first tries to serialize using OpenEdge.Core.Json.IJsonSerializer and
then Progress.IO.JsonSerializer. If the class implements neither then an invalid object
is returned.
If the class implements IJsonSerializer then the JSON returned has the format
{
"serializer": <STRING> // OOABL type name of the IJsonSerializer interface
"object": <STRING> // OOABL type name of the object being serialised
"data": <NULL|OBJECT|ARRAY> // the serialized object data
}
If the class uses the built-in serilisation, then the JSON format is
{
"prods:version": <VERISON>,
"prods:objId", <internal ID of this object)>
"<STRING>" : { // the string is the OOABL type name of the class being serialised
// serialisation data, per doc
}
}
@param Progress.Lang.Object The object to serialize
@return JsonObject The JSON data. May be invalid/unknown */
|
|
|
Progress.Json.ObjectModel.JsonArray Serialize (Object[])
|
/* Serialises an array of objects to JSON.
This method first tries to serialize using OpenEdge.Core.Json.IJsonSerializer and
then Progress.IO.JsonSerializer. If the class implements neither then an invalid object
is returned.
If there are duplicate objects in the array, then the index of the duplicate object is written
@param Progress.Lang.Object[] The objects to serialize
@return JsonArray The JSON data. May be invalid/unknown */
|
|
|
Progress.Lang.Object ToAblObject (JsonObject, Class)
|
/* Attempts to create an object of a specific type from serialised JSON data.
Delegates to ToAblObject(JsonObject, P.L.Class, P.L.Class) ; see that method for details of behaviour.
@param JsonObject The serialised data
@param Progress.Lang.Class (mandatory) The type of the object. This is used as the defined and implementation type
@return Progress.Lang.Object An object instance, based on the defined type. May be null if the criteria for types isn't met */
|
|
|
Progress.Lang.Object ToAblObject (JsonObject, Class, Class)
|
/* Attempts to create an object of a specific type from serialised JSON data.
1) Try to deserialize the JSON using this class' Deserialize() method. If not valid,
2) Try to get an instance of the defined type (from the Service Manager). If not valid,
3) Try to get an instance of the implementation type (from the Service Manager).
4) If valid, and meets the 'instantiable' criteria, deserialise using the JSON data
5) If not, return null
@param JsonObject (optional) The serialised data
@param Progress.Lang.Class (mandatory) The "defined type" of the object.
@param Progress.Lang.Class (mandatory) The "implementation type" of the object. Must be instantiable - not an interface,
nor abstract, default public constructor - and must implement IJsonSerializer
@return Progress.Lang.Object An object instance of the "defined type". May be null if the criteria for types isn't met */
|