You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msgspec's performance is generally on par with that of orjson. For some schemas we're faster, for some orjson is faster. For common message schemas though things should be about the same.
There are some valid reasons a user might prefer to migrate from orjson to msgspec.json instead:
msgspec also can handles schema validation using python type hints, similar to (but faster than) pydantic. Adding types also generally makes parsing faster, while providing stronger guarantees to the user.
For most users that aren't passing additional config options to orjson, porting should be as straightforward as swapping calls to orjson.loads to msgspec.json.decode and orjson.dumps to msgspec.json.encode. For other options we generally have a corollary, but the spelling is different. A short porting/comparison guide might be useful here.
Reacted by 叶子, 9128305, techntools, Michael, David Buchanan, Rhelvetican, 93578237 and Ofek Lev
Activity
Add porting guide for users coming from orjson
Add porting guide for users coming from orjson
Add porting guide for users coming from orjson (msgspec#1007)