On Wed, Apr 9, 2008 at 10:15 PM, Bob Ippolito <[EMAIL PROTECTED]> wrote:
> That sounds like a really bad idea, if there is an option to change
> the behavior it shouldn't live in module state.
>
Would you rather have strictness controls as parameters? demjson
currently has seventeen of those. Maybe we could have loads(bytes) and
loads_broken(bytes, allow_trailing_comma, allow_all_whitespace,
allow_comments, ...) functions, one for parsing JSON, the other for
parsing garbage. There's no real way to hide or remove the complexity
in parsing invalid data, so both warnings and parameters will cause
the implementation to be much larger, but at least having to call
warnings.filter ("ignore", JSONWarning) might serve to make some users
think twice.
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com