This error message occurs when you pass the empty string or an undefined variable to be decoded by JSON, JSON::PP or JSON::XS.
So I'd suggest that even with the updated code, the problem is related to the initialization of $jsonText - it appears to be undef.
In reply to Re^3: Getting error while decoding JSON object via POST method
by tobyink
in thread Getting error while decoding JSON object via POST method
by perlCrazy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |