Decode json content as utf8
This commit is contained in:
parent
8ac60d46a8
commit
b0f0b0084e
@ -94,7 +94,7 @@ class ServiceResult<R> {
|
||||
ServiceResult(this.response, R Function(Map<String, dynamic>) parser) {
|
||||
if (StringUtils.isNotEmpty(response.body) && response.success) {
|
||||
try {
|
||||
content = parser.call(jsonDecode(response.body!));
|
||||
content = parser.call(jsonDecode(utf8.decode(response.raw!.bodyBytes)));
|
||||
} on FormatException catch (e) {
|
||||
dev.log('ParseError: ${e.message}');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user