Jordan Szubert <joru...@gmail.com> added the comment: could not reproduce:
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from cStringIO import StringIO as F >>> import json >>> json.dumps('foo') '"foo"' >>> f=F() >>> json.dump('foo',f) >>> f.seek(0,0);f.read();f.seek(0,0) '"foo"' >>> json.dump({'a':['b']},f) >>> f.seek(0,0);f.read();f.seek(0,0) '{"a": ["b"]}' >>> Python 2.6.5+ (release26-maint, Jul 30 2010, 23:04:10) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import json >>> from cStringIO import StringIO as F >>> f=F() >>> json.dump('foo',f) >>> json.dumps('foo') '"foo"' >>> f.seek(0,0);f.read();f.seek(0,0) '"foo"' >>> json.dump({'a':1,'_':2},f) >>> f.seek(0,0);f.read();f.seek(0,0) '{"a": 1, "_": 2}' >>> json.dumps({'a':1,'_':2}) '{"a": 1, "_": 2}' >>> ---------- nosy: +joru _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9668> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com