Map<String, Object?> toJson() => { 'changes': changes.map( (uri, edits) => MapEntry(uri, edits.map((e) => e.toJson()).toList()), ), };