Skip to content

Commit

Permalink
chore: compare to pydantic v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Olegt0rr authored and jcrist committed Dec 13, 2023
1 parent f8d2c1a commit dceeec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmarks/bench_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class DirectoryModel(pydantic.BaseModel):

def bench_pydantic(n):
return bench(
lambda p: p.json(),
DirectoryModel.parse_raw,
lambda p: p.model_dump_json(),
DirectoryModel.model_validate_json,
n,
lambda data: DirectoryModel(**data),
)
Expand Down

0 comments on commit dceeec3

Please sign in to comment.