Class shardimage\shardimagephpapi\helpers\JsonHelper

Inheritanceshardimage\shardimagephpapi\helpers\JsonHelper

32-bit safe json encoding and decoding functions.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
decode() Decodes a json string into an array. If the current system does not support 64-bit integers, those integers are converted to Int64 objects. shardimage\shardimagephpapi\helpers\JsonHelper
encode() Encodes the value to a json string. Int64 objects are converted to 64-bit integers. shardimage\shardimagephpapi\helpers\JsonHelper

Method Details

decode() public static method

Decodes a json string into an array. If the current system does not support 64-bit integers, those integers are converted to Int64 objects.

public static mixed decode ( $json )
$json string

Json string

encode() public static method

Encodes the value to a json string. Int64 objects are converted to 64-bit integers.

public static string encode ( $value )
$value mixed

Value