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