Mojo::JSON encodes Math::BigFloat and Math::BigInt as strings. Example:
use Mojo::JSON 'encode_json';
use Math::BigFloat;
use Math::BigInt;
my $float = Math::BigFloat->new(12.34);
my $int = Math::BigInt->new(123);
print encode_json {float => $float, int => $int}; #
{"int":"123","float":"12.34"}
Wouldn't it make sense to return them as numbers instead?
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.