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