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

Can we relax the requirement of int64 numbers being represented as strings in the JSON Format for integer numbers that don't lose precision in ECMAScript when represented as numbers?

    XMLWordPrintable

    Details

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

      [Applied]

    • Proposal:
      Hide

      Change the default serialization of number (Int64 and Decimal particularly) as numbers in JSON.
      Add support for the 'IEEE754Compatible' format parameter to the application/json format and require that the producer MUST serialize Int64 and Decimal numbers as strings if this format parameter has been specified.

      Show
      Change the default serialization of number (Int64 and Decimal particularly) as numbers in JSON. Add support for the 'IEEE754Compatible' format parameter to the application/json format and require that the producer MUST serialize Int64 and Decimal numbers as strings if this format parameter has been specified.
    • Resolution:
      Show
      Accepted: https://www.oasis-open.org/committees/download.php/49055/odata-meeting-35_on-20130502-minutes.html#odata-342

      Description

      The current JSON Format specification requires all Int64 numbers to be represented as strings because of the limitation of numbers in JavaScript were these numbers get stored as 64-bit binary format IEEE values and therefore lose precision past 15 digits. However numbers up to that point could still be represented as numbers.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hubert.heijkers Hubert Heijkers
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: