HP 3PAR Web Service API 1.3.1 Developer's Guide

include all members. A client can perform one of two possible operations when creating the JSON
object:
Include only the members required for the operation
or
Include a member that is not required, but with a value that means it should be ignored.
NOTE: A JSON object that has only ignored fields or null fields will be considered empty.
A JSON array with no elements is considered empty.
Objects and arrays composed of sub-objects or sub-arrays that are empty are themselves
considered empty.
Although objects and arrays can be present and named in input, if they are considered empty,
the server may respond as if the objects and arrays are not present, and may return an error
stating that required members are missing.
When writing a client in a language that provides services for serializing a class into a JSON
object, it is convenient to only have a single class that represents all required or optional members.
The following sections specify the special values to use to ignore a member.
For more information about JSON object format, see the following website:
json.org
Null Members
The WSAPI supports properties with a value of null. Clients written in languages that provide classes
(or objects) as alternatives to primitives may generate JSON objects such that the value of the
property will be null. Null properties are ignored by the WSAPI.
For example, a client written in Java that uses the Jackson JSON processor, with attributes cast as
Boolean or Integer that are not initialized, will result in JSON properties with a value of null
when using the Jackson JSON processor. Conversely, uninitialized attributes cast as boolean or
int will result in JSON properties with a value of 0 (zero)—which may or may not be meaningful
for the property.
When the API server returns information, it does not include explicit null values in the JSON object
for properties that have no value or that are unset. For example, querying a volume that is not in
a domain will return a JSON object with the domain field omitted rather than containing
<domain>:null.
Enumerations
Some properties have values from a fixed set of limited values. For example, the state property of
a storage volume can be one of the following:
Normal
Degraded
Failed
When properties like these are present in a JSON object, they are represented numerically.
In addition to the values shown in the definition of an enumeration, each enumeration can also
have the value of -1, meaning that the API server has encountered a value that it does not recognize
and therefore cannot assign a value from the valid set. This usually means that the user has entered
an invalid enumeration value or that there is a defect in the API server.
The values defined for an enumeration start with 1; the value 0 is unused.
18 Accessing the WSAPI