JSON parser grammar [correction]

David-Sarah Hopwood david-sarah at jacaranda.org
Fri Jun 5 12:23:17 PDT 2009


David-Sarah Hopwood wrote:
> [...] As for escaping <LS> as \u2028
> and <PS> as \u2029, json2.js already does that. In fact it \u-escapes
> all of the characters in this regexp:
> 
> var escapable =
> /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g

I should have said that it escapes all of the characters in that regexp
(not all using \u).

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com



More information about the es5-discuss mailing list