Skip to content

Porting guide for users coming from orjson #642

@jcrist

Description

@jcrist

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:

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.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions