extendedJsonDecode function

dynamic extendedJsonDecode(
  1. String encoded
)

a wrapper around jsonDecode to upcast types from dynamic to primitives

Implementation

dynamic extendedJsonDecode(String encoded) {
  final r = jsonDecode(encoded);

  return r is Iterable ? r.map((e) => _intConverter.fromJson(e)).toList() : r;
}