[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2014-12-02 Thread Tom Christie
Tom Christie added the comment: > There is explicit note in the documentation about incompatibility with > JavaScript. That may be, but we're still unnecessarily making for a poorer user experience. There's no good reason why we shouldn't just treat \u2028 and \u2029 as control characters - i

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is explicit note in the documentation about incompatibility with JavaScript. -- ___ Python tracker ___

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2014-12-02 Thread Tom Christie
Tom Christie added the comment: I believe the status of this should be reassessed and that python should default to escaping '\u2028' and '\u2029'. *Strictly* speaking this isn't a bug and is per the JSON spec. *However* this *is* a bug in the JSON spec - which *should* be a strict subset of

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-11-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> committed/rejected status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Embedding JSON inside

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: On the one hand, supporting JSONP is a valid request for the json module. On the other hand, according to Wikipedia, "There have been some criticisms raised about JSONP. Cross-origin resource sharing (CORS) is a more recent method of getting data from a server

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is not JSON issue. If you need escaping of some domain-specific characters, do it youself. I.e. json.dump(...).replace('\u2028', r'\u2028').replace('\u2029', r'\u2029').replace(' invalid status: open -> pending _

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-06-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-06-23 Thread Antti Haapala
Antti Haapala added the comment: My mistake in writing, json ofc does specify that "control characters" be escaped. Then, it needs to be pointed out that JSON module DOES not currently escape \u007f-\u009f as it maybe strictly should >>> unicodedata.category('\u007f') 'Cc' >>> json.dumps({'a':

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-06-23 Thread Antti Haapala
New submission from Antti Haapala: JSON is not a strict superset of JavaScript (http://timelessrepo.com/json-isnt-a-javascript-subset). However, certain web technologies use JSON values as a part of JavaScript code (JSONP, inline tags)... The Python json module, however, by default does not e