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

In #147 we added a new `Examples` section to the docs, and added an example of using msgpsec to write a concise (and performant) GeoJSON implementation. What other examples should...

My understanding is that msgspec currently only supports basic type/schema validation, but not more complex validations like a regex pattern or arbitrary user functions, which Pydantic and other validators do...

I'd like to use the package to minimize a payload. Data is received from an endpoint in JSON and I would like to encode it array-like in messagepack. However this...

Hi there, I was trying out msgspec as an alternative for attrs with cattrs, but I ran into a roadblock with a union type that I have not had a...

It would be helpful if JSON schema generation was supported ```python class User(msgspec.Struct): """A new type describing a User""" name: str groups: Set[str] = set() email: Optional[str] = None schema...

My use case: handling an IPC stream of arbitrary object messages, specifically with `msgpack`. I desire to use `Struct`s for custom object serializations that can be passed between memory boundaries....

Out of the box mypy will properly catch errors when using - `msgspec.json.encode` / `msgspec.msgpack.encode` - `msgspec.json.decode` / `msgspec.msgpack.decode` - `msgspec.json.Decoder` / `msgspec.msgpack.Decoder` - `msgspec.json.Encoder` / `msgspec.msgpack.Encoder` This includes inferring...

`msgspec` currently contains methods for converting converting objects to/from bytes using either JSON or MessagePack protocols. Sometimes it'd be useful to convert to/from "simpler" types (lists, dicts, ...). Example use...

It can be interesting to add compatibility of this project with [HPy](https://github.com/hpyproject/hpy) Maybe some HPy maintainer (es: @antocuni ) can suggest how to proceed.

When optimizing, most people eventually end up with binary serialization and either combine it with a separate dictionary or build that into the serialization step. For example, `{"long_key_name": "value"}` ->...