We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, i upgraded json_api library from 1.0.1 to 2.0.1+1 and library failed on parsing meta object in relationships.
The library expects Map<String, String> json object but official specification allows unrestricted json object (see https://jsonapi.org/format/#document-meta)
Stacktrace: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, String>' #0 IdentifierObject.decodeJson (package:json_api/src/document/identifier_object.dart:16:67) #1 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29) #2 ListIterator.moveNext (dart:_internal/iterable.dart:343:26) #3 List.addAll (dart:core-patch/growable_array.dart:193:13) #4 new ToMany (package:json_api/src/document/relationship.dart:121:18) #5 ToMany.decodeJson (package:json_api/src/document/relationship.dart:131:18) #6 Relationship.decodeJson (package:json_api/src/document/relationship.dart:38:25) #7 Relationship.decodeJsonMap. (package:json_api/src/document/relationship.dart:53:62) #8 __InternalLinkedHashMap&_HashVMBase&MapMixin.map (dart:collection/maps.dart:163:28) #9 Relationship.decodeJsonMap (package:json_api/src/document/relationship.dart:53:12) #10 ResourceObject.decodeJson (package:json_api/src/document/resource_object.dart:42:41) #11 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29) #12 ListIterator.moveNext (dart:_internal/iterable.dart:343:26) #13 List.addAll (dart:core-patch/growable_array.dart:193:13) #14 new ResourceCollectionData (package:json_api/src/document/resource_collection_data.dart:19:21) #15 ResourceCollectionData.decodeJson (package:json_api/src/document/resource_collection_data.dart:27:16) #16 Document.decodeJson (package:json_api/src/document/document.dart:43:42) #17 JsonApiClient._call (package:json_api/src/client/client.dart:177:44) #18 JsonApiClient.fetchCollection (package:json_api/src/client/client.dart:31:7)
Thanks for your reply (And sorry for creepy english)
The text was updated successfully, but these errors were encountered:
Thanks for the report. I'm gonna get it fixed today.
Sorry, something went wrong.
Fix #54 (#55)
75b490f
v 2.0.2 has been published. @aleslanik2 please confirm the issue is fixed.
Yes, I am confirming that it's okay. Thanks a lot for a super speed fix!
Successfully merging a pull request may close this issue.
Hi,
i upgraded json_api library from 1.0.1 to 2.0.1+1 and library failed on parsing meta object in relationships.
The library expects Map<String, String> json object but official specification allows
unrestricted json object (see https://jsonapi.org/format/#document-meta)
Stacktrace:
type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, String>'
#0 IdentifierObject.decodeJson (package:json_api/src/document/identifier_object.dart:16:67)
#1 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
#2 ListIterator.moveNext (dart:_internal/iterable.dart:343:26)
#3 List.addAll (dart:core-patch/growable_array.dart:193:13)
#4 new ToMany (package:json_api/src/document/relationship.dart:121:18)
#5 ToMany.decodeJson (package:json_api/src/document/relationship.dart:131:18)
#6 Relationship.decodeJson (package:json_api/src/document/relationship.dart:38:25)
#7 Relationship.decodeJsonMap. (package:json_api/src/document/relationship.dart:53:62)
#8 __InternalLinkedHashMap&_HashVMBase&MapMixin.map (dart:collection/maps.dart:163:28)
#9 Relationship.decodeJsonMap (package:json_api/src/document/relationship.dart:53:12)
#10 ResourceObject.decodeJson (package:json_api/src/document/resource_object.dart:42:41)
#11 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
#12 ListIterator.moveNext (dart:_internal/iterable.dart:343:26)
#13 List.addAll (dart:core-patch/growable_array.dart:193:13)
#14 new ResourceCollectionData (package:json_api/src/document/resource_collection_data.dart:19:21)
#15 ResourceCollectionData.decodeJson (package:json_api/src/document/resource_collection_data.dart:27:16)
#16 Document.decodeJson (package:json_api/src/document/document.dart:43:42)
#17 JsonApiClient._call (package:json_api/src/client/client.dart:177:44)
#18 JsonApiClient.fetchCollection (package:json_api/src/client/client.dart:31:7)
Thanks for your reply
(And sorry for creepy english)
The text was updated successfully, but these errors were encountered: