Data Container Fields (Simple)

Simple fields are not arrays, lists, or subtype references.

For information about subtype references, see the discussion about data container fields (subtype references). Each serialization is similar but unique due to the differences in representing fields. In XML, it is based on tags; JSON uses its own field name and a colon ( : ) separator. Simple Field Examples includes examples of how a PhoneNumber field is represented in each format. describes how different data types are represented.

Table 1. Simple Field Examples
Format Example
XML
<PhoneNumber>14085550000</PhoneNumber>
JSON
"PhoneNumber": 14085550000
OpenAPI JSON Style
"phoneNumber": 14085550000

Some data types can have different, specific representations in serialized data containers. XML is unique because all of the fields follow the same convention: a start tag and end tag with the value represented as a text string within those two tags. JSON is different because it has two different value representations: numbers and text. Data Type Variations includes examples of how these fields are represented in MATRIXX field types, JSON, and OpenAPI.

Table 2. Data Type Variations
Format Numbers / Unquoted Fields Text
MATRIXX Field Types
  • bool
  • decimal
  • phone number
  • signed int{8|16|32|64}
  • unsigned int{8|16|32|64}
  • blob
  • datetime
  • object id
  • string
  • time
JSON
{
    ...,
    "DeliverMessages": true,
    "Amount": 23.87,
    "PhoneNumber": 14085550000,
    "Handicap": -5,
    "AgeInYears": 26,
    ...,
}
{
    ...,
    "NotificationMessage": "<base 64 string>",
    "Timestamp": "2020-05-19T12:35:27.012",
    "SubscriberObjectId": "0-1-2-3",
    "FirstName": "Ed",
    "BedTime": "01:30:00.000",
    ...,
}
OpenAPI JSON Style
{
    ...,
    "deliverMessages": true,
    "amount": 23.87,
    "phoneNumber": 14085550000,
    "handicap": -5,
    "ageInYears": 26,
   ...,
}
{
    ...,
    "notificationMessage": "<base 64 encoded string>",
    "timestamp": "2020-05-19T12:35:27.012",
    "subscriberObjectId": "0-1-2-3",
    "firstName": "Ed",
    "bedTime": "01:30:00.000",
    ...,
}