toJSON method
Transforms this instance into a JSON object.
Implementation
@override
Map<String,dynamic> toJSON() {
final json = super.toJSON();
json['terms'] = [];
for ( int i = 0, l = terms.length; i < l; i ++ ) {
final term = terms[ i ];
if ( term is FuzzyCompositeTerm ) {
json['terms'].add( term.toJSON() );
}
else {
json['terms'].add( term.uuid );
}
}
return json;
}