This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author merrellb
Recipients Brian.Merrell, belopolsky, merrellb, rhettinger, vstinner
Date 2011-03-14.20:21:05
SpamBayes Score 3.421452e-11
Marked as misclassified No
Message-id <AANLkTim5bHYGDUEi6fZC4v6JWD1eYRfpvUp8mbd+kVYH@mail.gmail.com>
In-reply-to <1300133375.67.0.828879918057.issue11489@psf.upfronthosting.co.za>
Content
On Mon, Mar 14, 2011 at 4:09 PM, Raymond Hettinger
<report@bugs.python.org>wrote:

>
> Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:
>
> > We seem to be in the worst of both worlds right now
> > as I've generated and stored a lot of json that can
> > not be read back in
>
> This is unfortunate.  The dumps() should have never worked in the first
> place.
>
> I don't think that loads() should be changed to accommodate the dumps()
> error though.  JSON is UTF-8 by definition and it is a useful feature that
> invalid UTF-8 won't load.
>

I may be wrong but it appeared that json actually encoded the data as the
string "u\da00" ie (6-bytes) which is slightly different than the encoding
of the utf-8 encoding of the json itself.  Not sure if this is relevant but
it seems less severe than actually invalid utf-8 coding in the bytes.

Unfortunately I don't believe this does anything on python 2.x as only
python 3.x encode/decode flags this as invalid.

> ----------
> nosy: +rhettinger
> priority: normal -> high
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue11489>
> _______________________________________
>
Files
File name Uploaded
unnamed merrellb, 2011-03-14.20:21:05
History
Date User Action Args
2011-03-14 20:21:07merrellbsetrecipients: + merrellb, rhettinger, belopolsky, vstinner, Brian.Merrell
2011-03-14 20:21:05merrellblinkissue11489 messages
2011-03-14 20:21:05merrellbcreate