简体   繁体   中英

Laravel 5: How to set parameters Response::json($data) as json_encode($data, JSON_UNESCAPED_UNICODE)?

Laravel 5: I have problem with unicode. if I do

return Response::json(['data' => 'Что то']);

Receive {data: \о\б\ь\я}

I want set parameter JSON_UNESCAPED_UNICODE to Response::json()

The following does not work:

Response::json(['data' => 'Что то'], JSON_UNESCAPED_UNICODE)

JSON_UNESCAPED_UNICODE设置为第四个参数:

return Response::json(['data' => 'Что то'], 200, [], JSON_UNESCAPED_UNICODE);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM