3 ms·
But looks_like_number("42") is still true. OTOH, JSON::PP can tell the difference between string and number: $ perl -MJSON::PP -E 'say JSON::PP::encode_json
by jwilk 5y ago
But looks_like_number("42") is still true.
OTOH, JSON::PP can tell the difference between string and number:
$ perl -MJSON::PP -E 'say JSON::PP::encode_json(42);'
42
$ perl -MJSON::PP -E 'say JSON::PP::encode_json("42");'
"42"
- heresie-dabord 5y agoIsn't it that this is specifically JSON syntax? "JSON recognises JSON".
- jwilk 5y agoNo.