class Json (View source)

Properties

static protected callable|null $encoder

The custom JSON encoder.

static protected callable|null $decoder

The custom JSON decode.

Methods

static mixed
encode(mixed $value)

Encode the given value.

static mixed
decode(mixed $value, bool|null $associative = true)

Decode the given value.

static void
encodeUsing(callable|null $encoder)

Encode all values using the given callable.

static void
decodeUsing(callable|null $decoder)

Decode all values using the given callable.

Details

static mixed encode(mixed $value)

Encode the given value.

Parameters

mixed $value

Return Value

mixed

static mixed decode(mixed $value, bool|null $associative = true)

Decode the given value.

Parameters

mixed $value
bool|null $associative

Return Value

mixed

static void encodeUsing(callable|null $encoder)

Encode all values using the given callable.

Parameters

callable|null $encoder

Return Value

void

static void decodeUsing(callable|null $decoder)

Decode all values using the given callable.

Parameters

callable|null $decoder

Return Value

void