toJson method
Implementation
@override
Object toJson() => {
if (text != null) 'text': text!.toJson(),
if (type.isNotDefault) 'type': type.toJson(),
if (sentiment != null) 'sentiment': sentiment!.toJson(),
if (probability.isNotDefault) 'probability': encodeDouble(probability),
};