BaseModel (Pydantic)
https://docs.pydantic.dev/latest/concepts/models/
Models are simply classes which inherit from BaseModel and define fields as annotated attributes.
https://docs.pydantic.dev/latest/api/base_model/
#Pydantic
model_fields
Metadata about the fields defined on the model, mapping of field names to FieldInfo.
This replaces Model.__fields__ from Pydantic V1.
model_validate_json
JSONデータ(文字列やbytes)から作る
model_dump
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
mode="python"(または"json")
v1がto_dict?
https://docs.pydantic.dev/latest/concepts/serialization/#python-mode
model_dump_jsonもある
https://docs.pydantic.dev/latest/concepts/serialization/#json-mode
self.__pydantic_serializer__.to_json().decode()