Map<String, dynamic> toMap() { var map = <String, dynamic>{}; nodes.forEach((k, v) { map[(k as YamlScalar).value.toString()] = _convertNode(v.value); }); return map; }