json.Serializer.getOption
Returns the current value of a JSON serializer option.
Syntax
getOption(
name STRING) RETURNS INTEGER
- name is the name of an option of the JSON serializer of type
STRING.
Usage
Use this method to return the current value of a JSON serializer option. The returned
INTEGER value depends on the option; for valid values per option, see
json.Serializer options.
In case of error, the method throws an exception and sets the
status variable. Depending on the error, a human-readable description of the
problem is available in the sqlca.sqlerrm register. See Error handling in GWS calls (status).
Example: return option value
Return the value of the allowNullAsDefault or
serializeNullAsDefault options. In this example, the
allowNullAsDefault option is returned.
IMPORT json
DEFINE isAllowNullAsDefault INTEGER
MAIN
DISPLAY json.Serializer.getOption("allowNullAsDefault")
VAR isAllowNullAsDefault = json.Serializer.getOption("allowNullAsDefault")
#...
END MAIN