Closed naxvog closed 9 months ago
Tries to use Illuminate\Database\Eloquent\Casts\Json if it is available and falls back to native json_encode/json_decode otherwise.
Illuminate\Database\Eloquent\Casts\Json
json_encode
json_decode
This change allows the usage of custom JSON serializers or custom serialization options by defining the following in a service provider:
Json::encodeUsing(fn ($value) => json_encode($value, JSON_UNESCAPED_UNICODE));
Thanks!
Breaks a lot of cases, reverting
Tries to use
Illuminate\Database\Eloquent\Casts\Json
if it is available and falls back to nativejson_encode
/json_decode
otherwise.This change allows the usage of custom JSON serializers or custom serialization options by defining the following in a service provider: