Merged
Merged
Conversation
This adds support for decoding JSON from `str` objects, rather than just
`bytes` (or bytes-like) objects.
For peak performance it's still recommended to decode from a bytes-like
object, but native support for decoding from str types is faster than
forcing the user to call `str_message.encode("utf-8")` themselves.
This also adds support for formatting str JSON messages using
`msgspec.json.format`. If a str is passed in the return type is a str,
otherwise the return type is `bytes`.
Labels
None yet