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?

    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

          hubert.heijkers Hubert Heijkers (Inactive) created issue -
          hubert.heijkers Hubert Heijkers (Inactive) made changes -
          Field Original Value New Value
          Component/s OData JSON Format [ 10272 ]
          hubert.heijkers Hubert Heijkers (Inactive) made changes -
          Fix Version/s V4.0_WD01 [ 10247 ]
          Proposal Allow Int64 numbers to be represented as numbers in JSON as long as they don't lose precision and only require them to be represented as strings if precision would dictate so. 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.
          Affects Version/s V4.0_WD01 [ 10247 ]
          ralfhandl Ralf Handl made changes -
          Environment [Proposed] [Applied]
          sdrees Stefan Drees (Inactive) made changes -
          Status New [ 10000 ] Open [ 1 ]
          sdrees Stefan Drees (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          sdrees Stefan Drees (Inactive) made changes -
          Status Resolved [ 5 ] Applied [ 10002 ]
          sdrees Stefan Drees (Inactive) made changes -

            People

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

              Dates

              • Created:
                Updated:
                Resolved: