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

Getting json attributes #17

Closed
marcantoinebouchard opened this issue Sep 20, 2023 · 0 comments · Fixed by #18
Closed

Getting json attributes #17

marcantoinebouchard opened this issue Sep 20, 2023 · 0 comments · Fixed by #18

Comments

@marcantoinebouchard
Copy link

marcantoinebouchard commented Sep 20, 2023

Using getAttributesByScope or getAttributeKvEntries on a json attribute crashes with exception:

"type 'List<dynamic>' is not a subtype of type 'String'"

The stack trace is:

#0      RestJsonConverter._parseValue (package:thingsboard_client/src/model/telemetry_models.dart:359:42)
#1      RestJsonConverter.toAttributes.<anonymous closure> (package:thingsboard_client/src/model/telemetry_models.dart:325:21)
#2      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#3      ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#4      new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#5      new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#6      new List.of (dart:core-patch/array_patch.dart:47:28)
#7      ListIterable.toList (dart:_internal/iterable.dart:214:7)
#8      RestJsonConverter.toAttributes (package:thingsboard_client/src/model/telemetry_models.dart:327:10)
#9      AttributeService.getAttributesByScope (package:thingsboard_client/src/service/attribute_service.dart:49:30)
<asynchronous suspension>
...
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

Successfully merging a pull request may close this issue.

1 participant