@override Object toJson() => { 'token': ?token, 'tokenId': ?tokenId, if (logProbability case final $1?) 'logProbability': encodeDouble($1), };