Attribute Values In REST Assessments
All attribute values in web service requests and responses are never localized and are specified in a culture neutral format as defined in the following table.
| Attribute type | REST JSON type | REST format | REST examples | Notes |
|---|---|---|---|---|
| boolean | json:boolean | true|false | true, false | |
| date | json:string | YYYY-MM-DD | '2010-12-24' |
The following conventions are used for dates:
Any timezone information provided for a date value is ignored. Date values are considered as an abstract date, not a particular point in time that needs to be interpreted according to different timezones. Values prior to 0001-01-02 or after 9999-09-08 are not supported. This means that the following will cause errors:
|
| datetime | json:string | YYYY-MM-DDThh:mm:ss | '2010-12-24T23:59:59' |
The following conventions are used for times:
All datetime values are interpreted as being in the timezone of the policy model. In REST format, there is no optional time zone. Values prior to 0001-01-02 or after 9999-09-08 are not supported. This means that the following will cause errors:
|
| time | json:string | hh:mm:ss | '23:59:59' |
Any timezone information provided for a time value is ignored. Time values are considered as an abstract time of day, not a particular point in time that needs to be interpreted according to different timezones. |
| text | json:string | 'Hello, world!' | ||
| number | json:number | 123, 123.456 |
Even though attribute values are never supplied nor returned directly to or from the web service in a localized manner, there are still some instances where the formatted attribute value appears, namely when that value has been used in text substitution. For example, attribute text, decision report node text, question screen labels and captions. In these case, each attribute value will use the output formats defined for the policy model.