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

### Description For creating immutable types, msgspec already supports serializing/parsing: frozenset, tuple, dataclass(frozen=True). The only primary data type missing here is a `dict`. The immutable variant of a dict is...

### Description In many scenarios and libraries one assumes that validation errors inherit from `ValueError`, however, `msgspec`'s exception classes do not. Would it be possible to make [`DecodeError`](https://jcristharif.com/msgspec/api.html#msgspec.DecodeError) and [`ValidationError`](https://jcristharif.com/msgspec/api.html#msgspec.ValidationError)...

### Description I want to (de)serialize instances of classes that are defined in third-party modules that I can't edit. I'd still like to use array_like for the performance and file...

### Description Maybe it would be much better, adding custom date time format support to [Datetime Constraints](https://jcristharif.com/msgspec/constraints.html#datetime-constraints) according to https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes

### Description Since `msgspec.Struct` types are effectively slotted classes, using `functools.cached_property` with structs requires the user to also set `dict=True`: ```python import functools import msgspec class RightTriangle(msgspec.Struct, dict=True): #

### Description Sorry if I missed this in the docs or other issues but is there a more decent way to create a computed field based on the value of...

### Description As mentioned in https://github.com/jcrist/msgspec/issues/491, it would be great to be able to change the repr of specific fields. [Attrs does this.](https://www.attrs.org/en/stable/examples.html#other-goodies) I usually do this for sensitive fields...

### Description I want to be sure that data which is serialized and transferred is really valid. Currently, the constraints are only checked when decoding them. To achieve this, one...

### Description This feature request is more of a discussion about how to use or generalize the current functionality to support large data and other serialization protocols. In my application,...

### Description This is half a question. When working with type definitions aka schemas and type objects, we usually keep them logically separate, in particular if the serialization protocol is...