Loading ...
Sorry, an error occurred while loading the content.

1445Re: Floating point leading zero problem

Expand Messages
  • Douglas Crockford
    Jan 18, 2010
    • 0 Attachment
      --- In json@yahoogroups.com, "glanca" <guy@...> wrote:
      > I'm using the JSON_Parser C library on one end and the org.json Java library on the other and they don't agree on the encoding for the floating point value 0.625. The diagram on the JSON.org website suggests that the leading zero is okay whereas the RFC4627 specification states that "Leading zeros are not allowed." for numbers. The org.json won't accept the leading zero and the JSON_Parser library won't accept a leading decimal point.
      > Which is right and which is wrong?

      0.625 a correct JSON number, and is accepted by org.json.JSONObject and by json2.js.
    • Show all 5 messages in this topic