AddNull( ) method (JsonObject)

Creates a property with a given name and sets its value to null.

This method is useful for those situations where you know at compile time that you will be adding a JSON null value. To use one of the Add( ) overloadings, you must set a variable to the Unknown value (?) first, then call Add( ) with the variable. Using the Unknown value (?) value as a constant in one of the Add( ) overloadings causes a compilation error, because the compiler is unable to resolve the overloading to use.

On successful execution, this method returns TRUE.

Return type: LOGICAL

Access: PUBLIC

Applies to: Progress.Json.ObjectModel.JsonObject class

Syntax

AddNull( INPUT property-name AS CHARACTER )
property-name
A CHARACTER expression naming the new property to be created. This name may be any string that can be represented as a valid Unicode string.

If property-name is the empty string (""), is the Unknown value (?), or does not exist, a JsonError is raised.