Ned Batchelder <n...@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 -- https://mail.python.org/mailman/listinfo/python-list