G
G
gupovski2018-05-07 17:16:12
PHP
gupovski, 2018-05-07 17:16:12

What is wrong with this JSON?

js on the front handles JSON of the given kind

{"errors":[{"type":"ValidationError","message":"{\"email\":[\"\\u041d\\u0435\\u043a\\u043e\\u0440\\u0440\\u0435\\u043a\\u0442\\u043d\\u044b\\u0439 e-mail. \\u0424\\u043e\\u0440\\u043c\\u0430\\u0442 \\u0432\\u0432\\u043e\\u0434\\u0430: [email protected]\"]}"}]}

Another error comes in a slightly different kind. Its js does not process the way I need.
{"errors":[{"type":"ValidationError","message":"{\"email\":\"\u0414\u0430\u043d\u043d\u044b\u0439 e-mail \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\"}"}]}

Yes, there is another code for getting errors, but I can't understand why one has double slashes and the other doesn't. Has it been parsed somewhere or what? Explain who knows why such a difference between them.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question