[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Updated: (ODATA-286) Need clarity about JSON encoding of Single and Double (and the applicability or not of ABNF rules) particularly for NaN, INF and -INF
[ http://tools.oasis-open.org/issues/browse/ODATA-286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralf Handl updated ODATA-286:
-----------------------------
Environment: [Applied] (was: [Applied to Atom and JSON])
> Need clarity about JSON encoding of Single and Double (and the applicability or not of ABNF rules) particularly for NaN, INF and -INF
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ODATA-286
> URL: http://tools.oasis-open.org/issues/browse/ODATA-286
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Task
> Components: OData JSON Format
> Affects Versions: V4.0_WD01
> Environment: [Applied]
> Reporter: Evan Ireland
> Assignee: Ralf Handl
> Fix For: V4.0_WD01
>
>
> According to odata-json-format-v4.0-wd01-2013-03-05-RH.doc (section 4.1.1)
> Values of types Byte, SByte, Int16, Int32, Single, and Double are represented as JSON numbers.
> but that does not account for NaN, Infinity and -Infinity.
> Now the ABNF (odata-abnf-construction-rules-v4.0-wd01.html) states that these values can be encoded as: 'NaN', 'INF' and '-INF'.
> However I understood that the ABNF rules are applicable to values in URLs, not in JSON (unless explicitly stated in the JSON doc, as is the case with geo types).
> Also note that the ABNF allows Double values to end with "d", and Single values to end with "f".
> Here then, we see an apparent contradiction. NaN, INF, -INF, Double values ending with "d", and Single values ending with "f" are permitted by the ABNF rules, but not permitted in a JSON number.
> The JSON spec (http://www.ietf.org/rfc/rfc4627.txt) section 2.4 quite clearly states:
> Numeric values that cannot be represented as sequences of digits
> (such as Infinity and NaN) are not permitted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]