How AR System data types are represented in JSON
JSON representation of data types
The uses many data types in its domain objects. The following data types are represented in the JSON format:
Data type | Description | Code example |
---|---|---|
Character and Enum | Character and enum data types use the JSON strings data type. The JSON string data type begins and ends with double quotation marks and contains Unicode characters in a sequence. | // Character value |
Integer, decimal, and real | Integer, decimal, and real data types use the JSON number type. The JSON number data type is an integer, real number, decimal point, with exponent part and prefix minus sign but it does not contain hexadecimal and octal forms. | // Integer value |
Date, time, and date/time | JSON does not have explicit date, time, and date/time value types. The follows the ISO 8601 format to represent the date, time and date/time values. | // Date value |
Diary | Diary fields contain multiple character entries that are stamped automatically with the date, time, and the name of the user who enters the item. When the client uses Merge entry or the server returns a response for GET entry, REST sends back an array of diary entries. | "diaryField" : [ "timestamp" : "2018-12-01T12:48:03.000+0000 "text" : "..." } ... ] |
Currency | Currency data types contains four separate parts: decimal value, the currency code, the conversion date, and functional values. The functional values are listed as an array of decimal values where the currency code is the JSON name. This format makes it easy for clients to get a particular functional value directly from the functionalValues object name, rather than reconciling a list of decimal and currency pair objects. | "currencyField" : { |
Attacments | REST treats attachments as a sub resource to the entry. Instead of trying to include binary data in a JSON document, REST treats it as its own resource. REST still maintains some metadata for the attachment, like its name and size, that is returned along with the URL. In this case, the URL is <original-entry-url>/attach/<fieldName>. | "attachmentField" : { |
Status history | The primary use case for status history is to display the user name and time stamp for a given status value. The REST API arranges the history values by status. If a client wants to know information about the New status, they can sort the list and get it directly instead of scanning through the entire list. | "statusHistory" : { |