@override Object toJson() => { if (nearestNeighbors != null) 'nearestNeighbors': nearestNeighbors!.toJson(), };