Language Reference Guide : 4. System Classes : JsonHandler Class : NewJsonValue Method
 
Share this page                  
NewJsonValue Method
Creates a new JsonValue subclass object for a given value (scalar or object).
This method has the following syntax:
JsonValue = JsonHandler.NewJsonValue(value = variable)
This method has the following parameter:
value
Specifies the variable for which a new JsonValue should be created.
The following mapping rules between the OpenROAD types and JsonValue subclasses apply:
OpenROAD Type
JsonValue sublass
NULL value (of any type)
JsonNull
decimal, float (any precision), integer (any size), money
JsonNumber
varchar, nvarchar
JsonString
date
JsonString
absolute dates are specified in ISO8601 format:
"yyyy-mm-ddThh:mi:ssZ" (for date with time)
"yyyy-mm-dd" (for date without time)
Object
JsonObject
The serializable attributes of a class are represented as members (see the SetSerializableClassAttributes() method).
The member name is the lowercase attribute name.
It will also contain a "classname" member if the type of the object is different from the declared type or if the AlwaysAddClassName attribute of the JsonHandler is set to TRUE.
Array
JsonObject
The JsonObject will contain a "rows" member, which is a JsonArray containing the JsonObject instances for the objects in the OpenROAD array.
It will also contain a "row_class" member if the type of the array is different from the declared type or if the AlwaysAddClassName attribute of the JsonHandler is set to TRUE.