Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
keomabrun opened this issue Sep 17, 2019 · 0 comments
Open

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

keomabrun opened this issue Sep 17, 2019 · 0 comments

Comments

@keomabrun
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant