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
Add `default` callback to `encode`/`Encoder`
Adds a `default` callback kwarg to `Encoder` constructor and `encode`
function. This takes a callable that's called for all unsupported types
to optionally convert them into supported types (or error if
unsupported). This is useful for lazily coercing possibly unsupported
types into a supported representation.
Also fixes a bug in the `Encoder` dealloc, and moves the `type` kwarg to
`msgspec.decode` to a keyword-only kwarg.