msgspec icon indicating copy to clipboard operation
msgspec copied to clipboard

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML

Results 211 msgspec issues
Sort by recently updated
recently updated
newest added

### Question I am using `msgspec` for its high-performance JSON decoding capabilities and have encountered a challenge when integrating it with data retrieved from MongoDB using PyMongo. As you may...

Would be great to have an efficient way to serialize msgspec structs to apache arrow, which would also open it up to using parquet and other tools in the arrow...

### Description The current [extension callbacks](https://jcristharif.com/msgspec/extending.html) mechanism for non-native types is fine for a single custom type used in one `msgspec.Struct` but doesn't quite scale when there are many custom...

I'm using msgspec for API response validation, so I wrote this: ```python class Response(Struct, frozen=True, kw_only=True): pass ``` So all of the responses should be created by passing kwargs, and...

### Description It would be beneficial to differentiate struct uniqueness by multiple fields. A good use case example is message versioning. You might have multiple message types and multiple versions...

### Description This seems related to #487 , but I came across a slightly different case of it. ```py import enum from msgspec import msgpack, Struct, Meta class SomeEnum(enum.IntFlag, boundary=enum.STRICT):...

### Description *This is more of a question than a feature request, but could turn into one.* One of my uses when it comes to deserialising something similar to: ```json...

Since `Struct` types force users to declare all `Struct` attributes, there's currently no way to hold extra state on a `Struct` without having it also be encoded/decoded. Two ways to...

It would be great if we could get the actual values of validation errors passed to ValidationError as attributes. Currently the best way to do this is to pass a...

### Description I would like to suggest allowing enums to be passed in literals and to the `tag` kwarg in `msgspec.Struct`s.