-
Notifications
You must be signed in to change notification settings - Fork 149
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
dump/load gives Invalid input type #65
Comments
Same issue with 0.2.1 |
from dataclasses import dataclass
from typing import List
from dataclasses_json import DataClassJsonMixin
@dataclass
class Entity(DataClassJsonMixin):
id: int
@dataclass
class Container(DataClassJsonMixin):
entities: List[Entity]
@dataclass
class Data(DataClassJsonMixin):
container: Container
schema = Data.schema()
schema.load({'container': {'entities': [{'id': 1}]}})
|
But works fine with 0.1.0 |
This was referenced Feb 21, 2019
Merged
Thanks for reporting this. Fixed in #66 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
schema().load()
does not seem to work for classes that contain lists. I can reproduce this even with the Boss/Minion example from the documentationFor what it's worth, going all the way to JSON and back seems to work fine:
The text was updated successfully, but these errors were encountered: