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
trafficstars

### Description ### Description Both `dec_hook` and `enc_hook` arguments are not respected in all encoders and decoders (tested on JSON and YAML) when `datetime` objects are used. Note that the...

It would be useful to be able to parse a list of input, while knowing some of them will not conform to a schema, for example, given a schema: ```py...

### Description Instead of globally setting `strict=False` on the decoder function/class, allow setting `strict=False` for specific fields. This way, we can get the non-strict conversions on some fields, and get...

### Question Basically, I am trying to set the alias of the Struct field, via `typing.Annotated[]`, however, the following code fails. ```py from __future__ import annotations import msgspec import hikari...

### Question One can generate a json schema from a [`msgspec.Struct`](https://jcristharif.com/msgspec/structs.html) using [`msgspec.json.schema`](https://jcristharif.com/msgspec/jsonschema.html). Where does one put that schema so that FastAPI uses it as the schema for the endpoint's...

Hi, This is a very rough draft, opening to see if @jcrist will be open for this feature/approach. It addresses #656 and my own #541 - allowing to decode data...

### Description Heyo, Relatively minor quibble. When reading the docs, the outputs is barely readable. Is it possible for that to be adjusted? ![image](https://github.com/jcrist/msgspec/assets/52616203/899d1cd7-93fa-46c9-9f50-3beebce2e001) thanks!

### Description **Setup** _Struct based class_ ``` from typing import Annotated import msgspec class TestModel(msgspec.Struct): key: Annotated[str, msgspec.Meta(max_length=6)] ``` _Importing the TestModel for further unit testing_ ```import pytest from tests.model...

### Description it seems that the json parser finds a "object" type in the JSON stream but can't assign it to a fields that expects "null" (air-gapped system, i can't...

### Description With the following code: ```python import msgspec as ms class Base(ms.Struct, frozen=True): ... class Child(Base): ... assert Child.__struct_config__.frozen is True ``` In a file: `frozen.py` And the following...