Json_decode() takes a JSON encoded string and converts it into a PHP variable.

declaration of json_decode

mixed json_decode ( string $json [, bool $assoc ] [, int $depth ] [, int $options ] )

test json_decode online

share json_decode

comments for json_decode

On 03. Jun 2013 07:37 indapublic wrote:

Your site is correctly working with my utf8 encoded json data, but I have JSON_ERROR_UTF8 error on my local site. What could be a reason?

On 29. May 2013 13:02 Fred wrote:

Did you do any special pre-parsing/encoding of the text? json_decode keeps failing for me inspite of it working here and on jasonlint validator. Not sure what it is..

On 29. Nov 2010 10:41 butzi wrote:

Sorry, currently only ISO-8859 is working well, as input charset. You use UTF-8 so, there are some problems. I am looking for a workaround, but this is very hard to find.

more comments for json_decode

There are some more comments for json_decode(). To see them all click here.


Leave your comment