On this page
Json
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.
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Database/Eloquent/Casts/Json.html