You really do attack the problem. But since I didn't explicitly see it, and am a bad reader, I just want to be sure that implementing...
use Cpanel::JSON::XS::Type; sub makeJSON { (my $hashref) = @_; my $json = encode_json($hashref, {returnvalue => JSON_TYPE_INT, username => JSON_TYPE_STRING, userid => JSON_TYPE_STRING, status => JSON_TYPE_STRING, filename => JSON_TYPE_STRING, rawfilename => JSON_TYPE_STRING, ticket => JSON_TYPE_STRING, message => JSON_TYPE_STRING}); return $json; }
...covers my bases.
Although am still a little offset that sometimes it turned it into a string, and sometimes not. But I'll get over it.
Again, thanks for making slides to let people know.
In reply to Re^4: Int becomes String when I convert to json
by bartender1382
in thread Int becomes String when I convert to json
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |