Map<String, Object?> toJson() => { if (entryId != null) 'entry': entryId, if (root != null) 'root': root, };