♻️ Refactor variable names for better readability in json_base_model_test.py
This commit is contained in:
@@ -10,9 +10,10 @@ class Person(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
x = '{"name": "hatter", "age": 18}'
|
json = '{"name": "hatter", "age": 18}'
|
||||||
p = Person.model_validate_json(x)
|
person = Person.model_validate_json(json)
|
||||||
z = p.model_dump_json(indent=4)
|
dump_json = person.model_dump_json(indent=4)
|
||||||
print(x)
|
|
||||||
print(p)
|
print(json)
|
||||||
print(z)
|
print(person)
|
||||||
|
print(dump_json)
|
||||||
|
|||||||
Reference in New Issue
Block a user