decodeJSON function
Implementation
dynamic decodeJSON(String rawJson) {
try {
return convert.json.decode(rawJson);
} on FormatException catch (e) {
LogService.error('invalid json format: '
'\n${e.toString().split("FormatException:").last}');
if (!Platform.isWindows) exit(0);
} on Exception catch (e) {
LogService.error('Unexpected error $e');
if (!Platform.isWindows) exit(0);
}
}