Skip to content

Provide dumps() method #99

Open
Open
@krismeister

Description

@krismeister

The current docs do not give an example of serialization support for JSON.

I attempted to use Marshmallow's dumps feature

db.MyModel.Schema.dumps(someInstanceOfMyModel)
# throws this error:
TypeError: dumps() missing 1 required positional argument: 'obj' marshmallow

But received an error. I am currently using someInstanceOfMyModel._raw to get the data for JSON output.

Feature Request
Add a expose a dumps method to get a dict.

db.MyModel.dumps(someInstanceOfMyModel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions