class JsonHelper

Helper methods for handling JSON encoding/decoding

Methods

static array
decode(string $json) deprecated

No description

static string
encode(object|array $value) deprecated

No description

Details

at line 25
static array decode(string $json) deprecated

deprecated 2.2 Use \GuzzleHttp\json_decode() instead

Parameters

string $json JSON encoded object or array

Return Value

array

Exceptions

RuntimeException On invalid JSON

See also

\GuzzleHttp\json_decode()

at line 45
static string encode(object|array $value) deprecated

deprecated 2.2 Use \GuzzleHttp\json_encode() instead

Parameters

object|array $value

Return Value

string

Exceptions

RuntimeException When the encoding failed

See also

\GuzzleHttp\json_encode()