Closed rockgecko-development closed 4 years ago
thx for reporting & the analysis! This should be resolved in this commit.
This change is now available from v1.0.13 that's now available on pub.dev.
Thanks very much, always impressed at how fast you respond to stuff like this!
The Dart JsonServiceClient is unable to deserialize list responses. This is the error:
This is the request dto:
I was able to fix this issue by overriding
createResponse
and changing:new ListConverter().fromJson(jsonObj, reqContext)
toJsonConverters.fromJson(json, responseAs.runtimeType.toString(), reqContext)
here https://github.com/ServiceStack/servicestack-dart/blob/e5e1e98a3489a9ad6e924b6d1b83b929d56dc552/lib/client.dart#L492Conveniently,
responseAs.runtimeType.toString()
returns the string"List<Item>"
, which is easily retrieved from TypeContext.Thanks!