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.43k stars 75 forks source link

Does msgspec have a concept of schema mode? #686

Open pgjones opened 6 months ago

pgjones commented 6 months 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.