♻️ 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__":
|
||||
x = '{"name": "hatter", "age": 18}'
|
||||
p = Person.model_validate_json(x)
|
||||
z = p.model_dump_json(indent=4)
|
||||
print(x)
|
||||
print(p)
|
||||
print(z)
|
||||
json = '{"name": "hatter", "age": 18}'
|
||||
person = Person.model_validate_json(json)
|
||||
dump_json = person.model_dump_json(indent=4)
|
||||
|
||||
print(json)
|
||||
print(person)
|
||||
print(dump_json)
|
||||
|
||||
Reference in New Issue
Block a user