1

According to the specification (and the odata.org summary) Edm.Single (and Edm.Double) are represented 'as a JSON string' (i.e. surrounded by double quotes). However the OData Library serializes Edm.Single (I haven't verified that Edm.Double has the same behavior) as number (i.e. unquoted). Is this a problem with the library - or the spec?

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
evoskuil
  • 1,011
  • 1
  • 7
  • 13

2 Answers2

1

This looks like a bug in the spec (both the MS-ODATA as well as the odata.org). I verified that the product (both OData Library and WCF DS) read and write these values as un-quoted, since double can fit into JSON's number just fine. (Note that one exception of NaN and Inf which are quoted). (I'll see what we can do about fixing the spec :-))

Vitek Karas MSFT
  • 13,130
  • 1
  • 34
  • 30
0

It is likely a problem with the odata.org summary.

If in doubt you should check out the more canonical documentation for the [format][1]: http://msdn.microsoft.com/en-us/library/dd541188(v=PROT.10).aspx

Alex James
  • 20,874
  • 3
  • 50
  • 49
  • I mentioned that the spec also shows the values as quoted. This is from the version of the spec you referenced: jsonSingle = quotation-mark singleLiteral quotation-mark – evoskuil Feb 28 '12 at 16:22