Skip to content

Commit a951c8a

Browse files
Fix #429: bug on serialization to json
1 parent 1f08632 commit a951c8a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/advanced/combine-pydantic-and-semver.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ To work with Pydantic>2.0, use the following steps:
4646
from_str_schema,
4747
]
4848
),
49-
serialization=core_schema.plain_serializer_function_ser_schema(
50-
lambda instance: instance.x
51-
),
49+
serialization = core_schema.to_string_ser_schema(),
5250
)
5351
5452
@classmethod

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy