Documentation on JSON primitive types for OData v2 incorrect
marikaner opened this issue · 1 comments
Either the documentation on primitive types or the implementation of the Northwind services is incorrect.
https://www.odata.org/documentation/odata-version-2-0/json-format/ states that for Edm.Single
values are represented as the "Literal form of Edm.Single as used in URIs formatted as a JSON string".
This means, that a value 1.5 would be represented as "1.5f". This differs from the documentation for the atom format. The Northwind services do not follow this rule either, e. g. Discount is a Edm.Single
property: https://services.odata.org/V2/Northwind/Northwind.svc/Invoices?$format=json&$select=Discount&$filter=Discount%20ne%200
What is the truth?
I believe the same issue applies for Edm.DateTimeOffset, where the correct would be to specify this as "/Date(["+" | "-"] )/" and not "Literal form of Edm.DateTimeOffset as used in URIs formatted as a JSON string"