child method

JsonModelReader? child(
  1. String key
)

Required nested object as a child reader sharing this reader's error list, so a nested failure surfaces with a dotted _at path on the SAME errors collection. Returns null (and records an error) when absent or not a map. Audited: 2026-06-12 11:26 EDT

Implementation

JsonModelReader? child(String key) {
  final Object? v = _map[key];
  if (v is Map) return JsonModelReader(v, path: _at(key));
  _typeError(key, v, 'object');
  return null;
}