toJSON method
Implementation
@override
dynamic toJSON(Object? object, SerializationContext context) {
final format = getNumberFormat(context.jsonPropertyMeta);
return object != null && format != null
? getNumberFormat(context.jsonPropertyMeta)!.format(object)
: (object is String)
? num.tryParse(object)
: object;
}