Documentation

encode

mixed public static
\Bitrix\Main\Web\Json::encode(
 mixed $data,
 null $options = null
);

Static method returns string, containing $data variable JSON representation.

Parameters

ParameterDescriptionVersion
$dataData for encoding.
$optionsBit mask parameters. Default value: JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS|JSON_HEX_QUOT.

Exception

See Also

Example



© «Bitrix24», 2001-2024
Up