Decimal values shall be encoded as a JSON object with the fields in Table 40.
Table 40 – JSON Object Definition for a Decimal
Name |
Description |
Scale |
A JSON number with the scale applied to the Value. |
Value |
A JSON string with the Value encoded as a base-10 signed integer. (See the XML encoding of Integer values described in 5.3.1.3). |
See 5.1.10 for a description of the Scale and Value fields.
When encoding in a Variant, a Decimal value shall be encoded as an ExtensionObject with the JSON object in Table 40 as the Body. The TypeId shall be the NodeId of the Decimal DataType and the Encoding shall be 0.