I\'m maintaining a PHP library that is responsible for fetching and storing incoming data (POST, GET, command line arguments, etc). I\'ve just fixed a bug that would not all
In case, if you are executing command line script with arguments through code then the best thing is to base encode it -
base64_encode(json_encode($arr));
while sending and decode it while receiving in other script.
json_decode(base64_decode($argv[1]));
That will also solve the issue of json receiving without quotes around the keys and values. Because without quotes, it is considered to be as bad json and you will not be able to decode that.