Skip to content

Is there a way to mix single object and list ? #48

Description

@keomabrun

Example:

{
    "Play" : {"genre": "Comedy", "title": "A Midsummer Night"s Dream", "pages": 350},
    "Poem" : [
        {"title": "Shall I compare thee to a summer"s day", "stanzas": 1},
        {"title": "As a decrepit father takes delight", "stanzas": 1},
        ....
    ],
}

So far I've managed to achieve it by adding a many=[True|False] argument, and modifying the serializer call, but I wonder if there is another (already existing) way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions