readAsJson<T extends dynamic> method
Implementation
Future<T> readAsJson<T extends dynamic>(
{T Function(Map<String, dynamic> payload)? constructor}) async {
final content = await readAsString();
final Map<String, dynamic> map = jsonDecode(content);
return constructor != null ? constructor(map) : map;
}