Skip to main content

%JSON.PropertyParameters

class %JSON.PropertyParameters

Property superclass used to hold information about property parameters for %JSON.Adaptor.

Parameters

parameter %JSONFIELDNAME;
The %JSONFIELDNAME parameter specifies the field name that this property is mapped to in JSON. The default %JSONFIELDNAME is the property name.
parameter %JSONIGNORENULL;
%JSONIGNORENULL allows the programmer to override the default handling of empty strings for string properties. This parameter applies to only true strings which is determined by XSDTYPE = "string" as well as JSONTYPE="string" By default (%JSONIGNORENULL = 0), empty strings in the JSON input are stored as $c(0) and $c(0) is written to JSON as the string "". A missing field in the JSON input is always stored as "" and "" is always output to JSON according to the %JSONNULL parameter.
If %JSONIGNORENULL is set = 1, then both missing fields in the JSON and empty strings are input as "", and both "" and $c(0) are output as field values of "".
parameter %JSONINCLUDE;
The %JSONINCLUDE parameter controls if this property will be included in the JSON output or input. Possible values are INOUT, INPUTONLY, OUTPUTONLY and NONE. The default is INOUT.
parameter %JSONNULL;
If %JSONNULL is true (=1), then unspecified properties are exported as the null value. Otherwise the field corresponding to the property is just skipped during export.
parameter %JSONREFERENCE;
%JSONREFERENCE specifies the default value of the %JSONREFERENCE property parameter that specifies how to project references to JSON. %JSONREFERENCE may be specified for any property to override this default value. Possible values of %JSONREFERENCE are "OBJECT", "ID", "OID", "GUID".
="OBJECT" is the default and indicates that the properties of the referenced class are used to represent the referenced object.
="ID" indicates that the id of a persistent or serial class is used to represent the reference.
="OID" indicates that the oid of a persistent or serial class is used to represent the reference. The form of the oid as projected to JSON will be classname,id.
="GUID" indicates the GUID of a persistent class is used to represent the reference.
FeedbackOpens in a new tab