F
F
FastClick2020-06-07 11:07:05
PHP
FastClick, 2020-06-07 11:07:05

json php output?

I'm taking out now

die(json_encode(['error' => ['code' => 100, 'message' => 'Метод не задан.']]));

As a result I get:
{"error":{"code":100,"message":"\u041c\u0435\u0442\u043e\u0434 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d."}}


How can I make the message display normally?
Added this:
header('Content-Type: application/json');
header('Accept: application/json');

the situation has not changed

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
netrox, 2020-06-07
@FastClick

json_encode(['error' => ['code' => 100, 'message' => 'Метод не задан.']], JSON_UNESCAPED_UNICODE );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question