jcrist / msgspec

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
https://jcristharif.com/msgspec/
BSD 3-Clause "New" or "Revised" License
2.01k stars 59 forks source link

Does msgspec have a concept of schema mode? #686

Open pgjones opened 1 month ago

pgjones commented 1 month ago

Question

Is it possible when generating a JSON Schema to specify the mode as validation or serialization with the former representing what can be accepted and the latter what will be serialized. If that doesn't make sense I think it is better explained in the pydantic docs.