decodeJsonAsync function
Background decoding is explicit. Model construction remains with the caller.
Implementation
Future<dynamic> decodeJsonAsync(String text, {bool background = false}) async {
if (background) {
return worker.decode(text);
}
return jsonDecode(text);
}