Search the web
Sign In
New User? Sign Up
json · JSON JavaScript Object Notation
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Potential bug in JSON.parse when parsing backslashes?   Message List  
Reply | Forward Message #1286 of 1409 |
Re: Potential bug in JSON.parse when parsing backslashes?

--- In json@yahoogroups.com, "cosmicrealms" <robert@...> wrote:
>
> Code: JSON.parse("\"T\\wo\"");
>
> In Firefox 3.5 and the latest json2.js from json.org this results in a parse
exception SyntaxError.
>
> Expected: Two

\w is not present in the JSON grammar. An implementation may produce a syntax
error. The behavior of Firefox 3.5 is correct.




Mon Jun 29, 2009 5:59 pm

douglascrock...
Offline Offline
Send Email Send Email

Forward
Message #1286 of 1409 |
Expand Messages Author Sort by Date

Code: JSON.parse("\"T\\wo\""); In Firefox 3.5 and the latest json2.js from json.org this results in a parse exception SyntaxError. Expected: Two It works in: *...
cosmicrealms
Offline Send Email
Jun 29, 2009
5:53 pm

... \w is not present in the JSON grammar. An implementation may produce a syntax error. The behavior of Firefox 3.5 is correct....
Douglas Crockford
douglascrock...
Offline Send Email
Jun 29, 2009
6:00 pm

... The interpretation of string escaping means that "\"T\\wo\"" is the external representation of a six-character string containing quote-T- ...
John Cowan
johnwcowan
Online Now Send Email
Jun 29, 2009
6:48 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help