use strict; use warnings; use JSON::MaybeXS; my $json_codec = JSON::MaybeXS->new; print ref $json_codec, "\n"; print $json_codec->encode( { d => 1.0 } ), "\n";