Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: Int becomes String when I convert to jsonby choroba (Cardinal) |
on May 10, 2022 at 07:23 UTC ( [id://11143730]=note: print w/replies, xml ) | Need Help?? |
> that a single digit it normally returns an int, but for a double digit a string. It's more complex than that. It depends on what you did with the value, on the version of Perl, what JSON module you use and its version, and sometimes even more. See my slides on the topic.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|