Dump Objects to JSON
Serialize single items and collections.
Dumping Defined
Turning a model object into plain JSON-ready data is called dumping. The schema reads your object and emits a clean dict.
Call dump
Pass your object to the schema's dump method. It returns a dictionary containing only the fields you declared, properly typed.
result = user_schema.dump(user)