diff --git a/reference/json/functions/json-decode.xml b/reference/json/functions/json-decode.xml index c40b5d1a3d..8bcef3b195 100644 --- a/reference/json/functions/json-decode.xml +++ b/reference/json/functions/json-decode.xml @@ -1,5 +1,5 @@ - + json_decode @@ -100,6 +100,31 @@ $json = '{"foo-bar": 12345}'; $obj = json_decode($json); print $obj->{'foo-bar'}; // 12345 +?> +]]> + + + + common mistakes using <function>json_decode</function> + + ]]> @@ -109,6 +134,11 @@ print $obj->{'foo-bar'}; // 12345 &reftitle.notes; + + + The JSON spec is not JavaScript, but a subset of JavaScript. + + This function will return false if the JSON encoded data is deeper than