2.5.2.2 JSON Data Mapping
The different Tuxedo buffer types are converted into/from JSON as shown in the table below:
Table 2-16 JSON Data Mapping
| Oracle Tuxedo Buffer Type | JSON equivalent/example | Notes |
|---|---|---|
STRING
|
<buffer content> | - |
CARRAY
|
<binary buffer content> | - |
MBSTRING
|
<Multi-byte string> | In order to transmit encodings other than UTF-8, the "enableMultiEncoding" property must be set to "true" in the SALTDEPLOY configuration.
|
XML
|
<XML fragment as-is> | In order to transmit encodings other than UTF-8, the "enableMultiEncoding" property must be set to "true" in the SALTDEPLOY configuration.
|
X_C_TYPE
|
Same as VIEW/VIEW32
|
- |
X_COMMON
|
Same as VIEW/VIEW32
|
- |
X_OCTET
|
Same as CARRAY |
- |
VIEW/VIEW32
|
possibly nested:
JSON has the following primitive types: boolean (true/false) Number (int or double float) String VIEW/VIEW32 field types will be mapped as follows (Tuxedo type: JSON type):
|
- |
| - |
|
See VIEW/VIEW32 considerations and examples for fieldname mapping details.
Some types may be truncated if represented in their primitive types ( |
FML/FML32
|
{'<fieldname>':'<fieldcontent>','<fieldname>':'<fieldcontent>'}possibly nested, FML32 only:
|
Nested
|
RECORD
|
{'<fieldname>':'<fieldcontent>','<fieldname>':'<fieldcontent>'}possibly nested:
|
- |
Note:
- Non-structured buffer types (
STRING,CARRAY,X_OCTETandMBSTRING) will not wrap data as JSON objects, the data is transmitted as is. The content-type setting is ignored for those buffer types with respect to data mapping. - JSON internally handles all floating point types differently than XML. XML conversion floating point conversion may incur some precision loss over similar JSON conversions. This is currently a limitation.