JSON Limitations in Legacy APIs

Due to a known limitation in the JSON parser used in SecureChange and SecureApp, JSON responses may not follow the documented format. This behavior affects several legacy APIs that still rely on the old XML-to-JSON conversion parser.

  • Flattened arrays: Arrays containing a single element may be returned as a single object instead of an array.
  • Unquoted strings: Fields defined as strings (such as name or display_name) may appear without quotes if the value is numeric.

To avoid these inconsistencies, use the application/xml format. All APIs support XML.

Examples

  1. String shown as number

    Actual:

    "name": 1

    Expected:

    "name": "1"
  2. Flattened array

    Actual:

    "roles": {
    			"role": {
    			"id": 5,
    			"name": "Requester"
    			}
    		}

    Expected:

    "roles": {
    			"role": [
    			{
    			"id": 5,
    			"name": "Requester"
    			}
    			]
    		}