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

Error deserializing #85

Open
knightsforce opened this issue Mar 24, 2023 · 1 comment
Open

Error deserializing #85

knightsforce opened this issue Mar 24, 2023 · 1 comment

Comments

@knightsforce
Copy link

When receiving JSON:
[ { "id": 1, "name": "Test", "schedule": { "slots": [ [], [], [], [], [], [], [ { "time_from": "10:30:00", "time_to": "15:45:00" } ] ] } } ]

I get an error after the response:
DioError [unknown]: null I/flutter (19668): │ Error: Deserializing '[{id: 2, name: Test, email: [email protected]...' to 'BuiltList<OverviewPlace>' failed due to: Deserializing '[id, 2, name, Test, email, [email protected]...' to 'OverviewPlace' failed due to: Deserializing '[slots, [[], [{time_from: 07:00:00, time_to: 14:00:00}, {time_from: 15:00:00,...' to 'Schedule?' failed due to: Deserializing '[[], [{time_from: 07:00:00, time_to: 14:00:00}, {time_from: 15:00:00, time_to...' to 'BuiltList<BuiltList<TimeSlot>>' failed due to: Deserializing '[]' to 'BuiltList<TimeSlot>' failed due to: Bad state: No builder factory for BuiltList<TimeSlot>. Fix by adding one, see SerializersBuilder.addBuilderFactory.

It was solved by adding the code to the serializers.dart file:
..addBuilderFactory( const FullType(BuiltList, [FullType(TimeSlot)]), () => ListBuilder<TimeSlot>(), )

@Dreaming-Codes
Copy link

I'm encountering the same problem it seems like this library does not supports matrices @gibahjoe

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

2 participants