Bitrix API

YandexJson extends Json

Table of Contents

Constants

DEFAULT_OPTIONS  = JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE

Methods

decode()  : mixed
Takes a JSON encoded string and converts it into a PHP variable.
encode()  : mixed
Returns a string containing the JSON representation of $data.

Constants

DEFAULT_OPTIONS

public mixed DEFAULT_OPTIONS = JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE

Methods

decode()

Takes a JSON encoded string and converts it into a PHP variable.

public static decode(string $data) : mixed
Parameters
$data : string

The json string being decoded.

Tags
throws
ArgumentException
see
json_decode

encode()

Returns a string containing the JSON representation of $data.

public static encode(mixed $data[, mixed $options = null ]) : mixed
Parameters
$data : mixed

The value being encoded.

$options : mixed = null

Bitmasked options. Default is JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE.


        
On this page

Search results