MDC Serialization

The data container package for MATRIXX Java components provides three different formats for serialization: XML, JSON, and OpenAPI JSON. These serialization formats depend on MATRIXX MDC definition files. MDC serialization describes data containers, structs, simple types, arrays and lists, and special fields.

These three serialization formats have "special fields" or specific sequences of tags (XML) that are required to decode messages into the correct data container representation. XML, JSON, and OpenAPI JSON describes the three formats.

Table 1. XML, JSON, and OpenAPI JSON
Format Description
XML XML uses tags introduced with angled brackets around the name of the tag. Tags indicate the beginning and ending of a field, and the beginning and ending of a container. An empty tag (an empty field) is one tag that ends with a /.

EXAMPLE:

The following example shows a field named MyField and a container named "MtxRequestSubscriberModify. Note that the start and end tag are slightly different, the end tag begins with a /.
<MyField>  ... </MyField>

<MtxRequestSubscriberModify>
 ...
</MtxRequestSubscriberModify>

EXAMPLE:

The following example shows an empty tag.
<EmptyField />

Note that the space between the tag name and the / is optional.

JSON In JSON, the start of an object and end are
{
and
}
respectively. The
"$"
field holds the name of the MDC.

EXAMPLE:

The following example shows an MDC named "MyContainer":
{
    "$": "MyContainer",
    ...
}
OpenAPI JSON Style The OpenAPI JSON format conforms to OpenAPI specifications. It uses the following fields: mtx_container_name, mtx_sys_ver, and mtx_ext_ver. Each represents metadata about the MDC.

The mtx_container_name field similar to the "$" field described in the JSON example above, and defines which data container the object represents.

The mtx_sys_ver field is the MATRIXX system version number and is always one of the MATRIXX release numbers.

The mtx_ext_ver is the customer-specific extension version.

EXAMPLE:

The following example shows an OpenAPI JSON example with an MDC named "MyContainer".
{
    "mtx_container_name":"MyContainer",
    "mtx_sys_ver": 5200,
    "mtx_ext_ver": 1,
    ....
}

The following sections described how objects and fields are used. For information about custom MDCs, see the discussion about working with custom MDCs.