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

1438Re: json2.js doesn't call toString() on input [was: json2 vs FF3 behaviour]

Expand Messages
  • Douglas Crockford
    Jan 7, 2010
    • 0 Attachment
      --- In json@yahoogroups.com, "nostalgiker" <nostalgiker@...> wrote:

      > is mr.crockford reading this list? imo this is then a bug in json2.js since JSON.parse(['true']) fails in his implementation but it should behave like ecma5's native JSON.


      JSON.parse wants to be called with a string. If you call it with anything else, you get what you deserve. I don't recommend reliance on the edge cases. That is where systems are the least portable.
    • Show all 13 messages in this topic