Have you printed out your JSON data string at the receiving end to see what you get there? An empty string gives the same error message:
>perl -MJSON -e "print JSON->new->decode('')" malformed JSON string, neither array, object, number, string or atom, +at character offset 0 (before "(end of string)") at -e line 1.
I think you are trying to pass the data around in a very bad manner:
<c> "/projectname/restfulapi?inputdata=$jsonData"; <c>If you send POST data, please read HTTP::Request on how to send POST data. If you want to send the data in an URI, please encode it properly using URI::Encode.
In reply to Re^3: Getting error while decoding JSON object via POST method
by Corion
in thread Getting error while decoding JSON object via POST method
by perlCrazy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |