Storing instances using jsonpickle

Marko Rauhamaa marko at pacujo.net
Fri Sep 5 20:04:44 CEST 2014


Ned Batchelder <ned at nedbatchelder.com>:

> 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?

There are occasions where you need to take shortcuts. Say you need to
glean information from JSON with bash, grep, awk or straight C. If JSON
was fixed to UTF-8, that would be quite feasible. Being as it is, you
are bound to 3rd-party libraries.

That alone invites ad-hoc encodings. For example, I have run into
"asterisked" JSON, libraries that limit themselves to UTF-8.

Compare that with HTTP, SMTP, or even XML(!). They fix the encoding to
the bit. No need for completely unnecessary options.


Marko



More information about the Python-list mailing list