class JsonHelper

Helper methods for handling JSON encoding/decoding

Methods

static array
decode(string $json)

No description

static string
encode(object|array $value)

No description

Details

at line 21
static array decode(string $json)

Parameters

string $json JSON encoded object or array

Return Value

array

Exceptions

RuntimeException On invalid JSON

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

Parameters

object|array $value

Return Value

string

Exceptions

RuntimeException When the encoding failed