Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on JSON primitive types for OData v2 incorrect #204

Open
marikaner opened this issue Feb 10, 2020 · 1 comment
Open

Documentation on JSON primitive types for OData v2 incorrect #204

marikaner opened this issue Feb 10, 2020 · 1 comment

Comments

@marikaner
Copy link

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?

@jkougoulos
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants