Exponential notation for Edm.Decimal values in JSON payloads

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.0_ERRATA03
    • Affects Version/s: V4.0_ERRATA02
    • Component/s: JSON Format
    • None
    • Environment:

      [Applied]

    • Hide

      Introduce a format parameter, named "ExponentialDecimals", that tells the service that the client is able to receive decimals using exponential notation. In presence of this format parameter, services MAY (but are not required to) serialize decimal values in exponential notation.

      Clients should verify in Capabilities.SupportedFormats whether or not service supports this before sending decimal values in exponential notation.

      Sender MUST specify this format parameter in the Content-Type header if it sends decimal values in exponential notation

      Applied:
      https://www.oasis-open.org/committees/download.php/55612/odata-json-format-v4.0-wd08-2015-05-07.docx

      Show
      Introduce a format parameter, named "ExponentialDecimals", that tells the service that the client is able to receive decimals using exponential notation. In presence of this format parameter, services MAY (but are not required to) serialize decimal values in exponential notation. Clients should verify in Capabilities.SupportedFormats whether or not service supports this before sending decimal values in exponential notation. Sender MUST specify this format parameter in the Content-Type header if it sends decimal values in exponential notation Applied: https://www.oasis-open.org/committees/download.php/55612/odata-json-format-v4.0-wd08-2015-05-07.docx

      IEEE754 defines the DECFLOAT data type for high-precision decimal arithmetic. They have 16 or 34 decimal digit mantissas and exponents between -383 and +384 or -6143 and +6144.

      The OData JSON Format represents Edm.Decimal values as JSON numbers, and JSON numbers allow exponential notation, so

      "VeryLittle":1.4e-6143

      should be valid in JSON payloads.

            Assignee:
            handl
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: