Storing instances using jsonpickle

Ned Batchelder ned at nedbatchelder.com
Fri Sep 5 19:30:14 CEST 2014


On 9/5/14 1:16 PM, Marko Rauhamaa wrote:
> MRAB <python at mrabarnett.plus.com>:
>
>> Therefore, if you want it to be able to drop it into Python's REPL, it
>> won't be compatible with JSON anyway! (Well, not unless you define
>> 'true' and 'false' first.)
>
> Sigh. I was so hopeful JSON would be great. Unfortunately, it flopped by
> requiring the parser to heuristically support 5 encoding systems.

I don't understand how JSON has flopped?  The parser may be a bit more 
complex (but not much, it isn't hard to examine the first few bytes), 
but you're using off-the-shelf parsers anyway, so why are you concerned 
by this?

>
> Thus, ast.literal_eval() is superior to anything JSON has to offer.
>
>
> Marko
>


-- 
Ned Batchelder, http://nedbatchelder.com




More information about the Python-list mailing list