toJson method
Implementation
Json toJson() => {
'schema': kSchemaVersion,
if (id.isNotEmpty) 'id': id,
'roots': roots,
'nodes': {for (final e in nodes.entries) e.key: e.value.toJson()..remove('id')},
...extra,
};
Json toJson() => {
'schema': kSchemaVersion,
if (id.isNotEmpty) 'id': id,
'roots': roots,
'nodes': {for (final e in nodes.entries) e.key: e.value.toJson()..remove('id')},
...extra,
};