I\'m building and API on top of Flask using marshmallow and mongoengine. When I make a call and an ID is supposed to be serialized I receive the following error:
marshmallow-mongoengine does this:
Marshmallow-Mongoengineis about bringing together aMongoengineDocument with aMarshmallowSchema.
import marshmallow_mongoengine as ma
class ProcessSchema(ma.ModelSchema):
class Meta:
model = Process
It has an ObjectId field that serializes/deserializes ObjectIds.