Often confuse the two PHP functions:
json_encode () is a variable coding json
json_encode () is the value to be encoded, and the encoding function only valid data utf8
of json_decode ($ json) json to decode data is converted into variable PHP
$ JSON data to be decoded, the data must be encoded utf8
When json_decode ($ json, true) is returned array value is TRUE, FALSE by default as empty or JSON object