$optional<T> method
Optional property key, converted by read; null when absent or null.
Implementation
T? $optional<T>(String key, T? Function(Object? value, String path) read) {
final value = _json[key];
if (value == null) return null;
return read(value, '$runtimeType.$key');
}