Converts the instance to a JSON map.
Map<String, dynamic> toJson() { return { 'unit': unit, 'numerator': numerator, 'denominator': denominator, }; }