-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
ProductPackaging fields can be a JSON map or a string. #977
Comments
…t string and JSON map (openfoodfacts#977)
Hi @Rujitsuki! |
Hi @monsieurtanuki , thanks for the support! A selection of fields helped! The packaging wasn't important to me, and I'm now using |
You're welcome @Rujitsuki! |
Description
When searching for products, the error
_TypeError (type 'String' is not a subtype of type 'Map<String, dynamic>' in type cast)
occasionally occurs. Apparently, in the ProductPackage model, the fields 'shape' and 'material' can either be a JSON map or a string.Expected behavior
In the response example 1 of the API documentation, 'shape', 'material' and 'recycling' appear twice, once as a string and once as a key-value pair. (Documentation)
Stacktraces
Package information
Open Food Facts package version: 3.15.0
Hopefully, I'm not misinterpreting this :)
The text was updated successfully, but these errors were encountered: