Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-771

Exponential notation for Edm.Decimal values in JSON payloads

    XMLWordPrintable

    Details

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

      [Applied]

    • Proposal:
      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

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: