toJson method

Json toJson()

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,
    };