2.5.1.2 JSON Data Mapping
The different Oracle Tuxedo buffer types are converted into/from JSON as shown in the table below:
Table 2-13 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
|
{'<fieldname>':'<fieldcontent>', '<fieldname>':'<fieldcontent>'} possibly nested
|
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, {'
|
Nested For Example:
JSON content (
|
RECORD
|
{'<fieldname>':'<fieldcontent>',
'<fieldname>':'<fieldcontent>'} possibly nested
Generated COBOL field types will be mapped as follows (Tuxedo type: JSON type): Generated COBOL types:
|
- |
Note:
Non-structured buffer types (STRING
, CARRAY
, X_OCTET
and MBSTRING
) will not wrap data as JSON objects, the data is transmitted as is.
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.