Re: Re: Escaping of / in JSON

2011-04-17 Thread Douglas Crockford
On 11:59 AM, Allen Wirfs-Brock wrote: On Apr 13, 2011, at 6:14 AM, Kyle Simpson wrote: Many JSON serializer implementations escape the "/" character, including for instance PHP's json_encode(). However, JavaScript's own JSON.stringify() does not. If you look at the grammar on json.org, as I r

Re: Escaping of / in JSON

2011-04-17 Thread Allen Wirfs-Brock
On Apr 13, 2011, at 6:14 AM, Kyle Simpson wrote: > Many JSON serializer implementations escape the "/" character, including for > instance PHP's json_encode(). However, JavaScript's own JSON.stringify() does > not. If you look at the grammar on json.org, as I read it, the escaping of > "/" is

Re: Escaping of / in JSON

2011-04-13 Thread Mike Samuel
2011/4/12 Oliver Hunt : > It has recently been brought to my attention that a particular use case of > JSON serialisation is to include JSON serialised content directly into an > HTML file (inside a script tag).  In this case in addition to the threat of > strings being terminated by a double qu

Re: Escaping of / in JSON

2011-04-13 Thread Kyle Simpson
Reichstein" Sent: Wednesday, April 13, 2011 4:26 AM To: "EcmaScript Steen" ; "es5-discuss" ; "Oliver Hunt" Subject: Re: Escaping of / in JSON On Wed, 13 Apr 2011 07:30:58 +0200, Oliver Hunt wrote: It has recently been brought to my attention that a particul

Re: Escaping of / in JSON

2011-04-13 Thread Lasse Reichstein
On Wed, 13 Apr 2011 07:30:58 +0200, Oliver Hunt wrote: It has recently been brought to my attention that a particular use case of JSON serialisation is to include JSON serialised content directly into an HTML file (inside a script tag). In this case in addition to the threat of strings be