@override Object toJson() => { if (contents.isNotDefault) 'contents': [for (final i in contents) i.toJson()], };