toJson method
Implementation
@override
Object toJson() => {
if (neighborCount.isNotDefault) 'neighborCount': neighborCount,
if (crowdingCount.isNotDefault) 'crowdingCount': crowdingCount,
if (restrictions.isNotDefault)
'restrictions': [for (final i in restrictions) i.toJson()],
if (returnEmbeddings.isNotDefault) 'returnEmbeddings': returnEmbeddings,
if (dataFormat.isNotDefault) 'dataFormat': dataFormat.toJson(),
};