json.Serializer.getOption

Returns the value of a JSON serializer global option.

Syntax

json.Serializer.getOption(
   name STRING) RETURN INTEGER
  1. name is the name of an option of the JSON serializer of type STRING.

Usage

Use this method to return values of global options set for the JSON serializer.

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