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
Nevermind, i realized that dumping json5 doesn't make much sense as decoding doesn't load comments (which is kind of point I wanted to use json5 as an option).
Anyway, leaving this issue for discussion.
+1 Would be nice if dump supports both string and bytes, its not very clear in the documentation that only bytes is supported. Kind of a shocker when changing from the default json impl.
The library supplies load(s) and dump(s) functions, so you can use it as a drop-in replacement for Python's builtin json module, but you should use the functions encode_() and decode_() instead.
The lib should load/dump the same data if I just use it as a replacement for a regular json...
Hi there, I'm currently working on personal l10n system that can use different JSON parsing implementations.
It looks something like this:
Of course, we are expecting the same interface as builtin
json
have.Because
pyjson5.dump(...)
and other encode functions havesupply_bytes=True
, it throws an error:I know that changing defaults would break old code, so is there any way we can fix this?
The text was updated successfully, but these errors were encountered: