JSON

suggest change

Versions

[{“Name”:“5.2”,“GroupName”:“PHP 5.x”},{“Name”:“5.3”,“GroupName”:“PHP 5.x”},{“Name”:“5.4”,“GroupName”:“PHP 5.x”},{“Name”:“5.5”,“GroupName”:“PHP 5.x”},{“Name”:“5.6”,“GroupName”:“PHP 5.x”},{“Name”:“7.0”,“GroupName”:“PHP 7.x”},{“Name”:“7.1”,“GroupName”:“PHP 7.x”}]

Introduction

JSON (JavaScript Object Notation) is a platform and language independent way of serializing objects into plaintext. Because it is often used on web and so is PHP, there is a basic extension for working with JSON in PHP.

Syntax

Parameters

Parameter | Details | ——— | —–– |

|json_encode| -| | value | The value being encoded. Can be any type except a resource. All string data must be UTF-8 encoded. | |options|Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT, JSON_PRESERVE_ZERO_FRACTION, JSON_UNESCAPED_UNICODE, JSON_PARTIAL_OUTPUT_ON_ERROR. The behaviour of these constants is described on the JSON constants page.| |depth|Set the maximum depth. Must be greater than zero.| | json_decode | -| | json | The json string being decoded. This function only works with UTF-8 encoded strings. | |assoc|Should function return associative array instead of objects.| |options|Bitmask of JSON decode options. Currently only JSON_BIGINT_AS_STRING is supported (default is to cast large integers as floats)|

Remarks

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents