You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to be considered more carefully. For now, important thoughts are:
text input should probably be disallowed, as it complicates logic, reduces performance and introduces subtle errors
yajl_dont_validate_strings could be enabled by default to make parser insensitive to the encoding. For binary output it should pass data as is, for unicode output python encoding would give more informative error messages
The text was updated successfully, but these errors were encountered:
Apart from this, the following behavior makes sense:
binary→binary trivial, no encoding needed. Require binary path as well?
binary→unicode decode as open would do, use encoding/errors arguments with sane defaults. Apply same to path.
unicode→unicode may just encode to/from utf-8 internally. But better disallow.
unicode→binary and this one does not make much sense. Should we try to recover original encoding from file handle and encode into it (encoding is not always available), or should we encode according to arguments? How should we handle path? Very ambiguous.
After some thought, we should not disallow unicode input, as there could be a case of e.g. utf-16 input decoded. So in case of any non-binary input, just encode it as utf-8 for YAJL (which it expects internally) and decode normally.
Need to be considered more carefully. For now, important thoughts are:
yajl_dont_validate_strings
could be enabled by default to make parser insensitive to the encoding. For binary output it should pass data as is, for unicode output python encoding would give more informative error messagesThe text was updated successfully, but these errors were encountered: