core.Map<core.String, core.dynamic> toJson() => { if (magnitude != null) 'magnitude': magnitude!, if (unit != null) 'unit': unit!, };