A
A
Ali Ali2019-02-09 05:02:22
JSON
Ali Ali, 2019-02-09 05:02:22

How to decrypt JSON code?

<div>
<button data-description='{"title":"(\u043c\u0430\u0441\u0441\u0430 3,9 \u0442\u043d, \u043e\u0442\u0432\u0430\u043b 0,7 \u043c3)","characteristics":"{\"1\":{\"title\":\"\\u042d\\u043a\\u0441\\u043f\\u043b\\u0443\\u0430\\u0442\\u0430\\u0446\\u0438\\u043e\\u043d\\u043d\\u0430\\u044f \\u043c\\u0430\\u0441\\u0441\\u0430:\",\"value\":\"3940 \\u043a\\u0433\"},\"2\":{\"title\":\"\\u041c\\u043e\\u0449\\u043d\\u043e\\u0441\\u0442\\u044c \\u0434\\u0432\\u0438\\u0433\\u0430\\u0442\\u0435\\u043b\\u044f:\",\"value\":\"32 \\u043a\\u0412\\u0442 (43 \\u043b.\\u0441.)\"},\"3\":{\"title\":\"\\u0420\\u0430\\u0437\\u043c\\u0435\\u0440 \\u043e\\u0442\\u0432\\u0430\\u043b\\u0430:\",\"value\":\"2170\\u0445820 \\u043c\\u043c\"},\"4\":{\"title\":\"\\u041e\\u0431\\u044a\\u0435\\u043c \\u043e\\u0442\\u0432\\u0430\\u043b\\u0430:\",\"value\":\"0,7 \\u043c3\"},\"5\":{\"title\":\"\\u0413\\u043b\\u0443\\u0431\\u0438\\u043d\\u0430 \\u0440\\u0435\\u0437\\u043a\\u0438:\",\"value\":\"355 \\u043c\\u043c\"},\"6\":{\"title\":\"\\u0428\\u0438\\u0440\\u0438\\u043d\\u0430 \\u0431\\u0430\\u0448\\u043c\\u0430\\u043a\\u0430:\",\"value\":\"300 \\u043c\\u043c\"},\"7\":{\"title\":\"\\u0413\\u0430\\u0431\\u0430\\u0440\\u0438\\u0442\\u044b (\\u0414\\u0445\\u0428\\u0445\\u0412):\",\"value\":\"3365\\u04451310\\u04452450 \\u043c\\u043c\"}}"}'
 data-target="#descriptionModal" data-toggle="modal" class="btn btn-default btn-equipment-description">
<span>Подробнее</span>
</button>
</div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
gsmcatcher, 2021-01-18
@gsmcatcher

You need to correctly return json on the server side. pass the JSON_UNESCAPED_UNICODE option.
Example:
echo json_encode($array , JSON_UNESCAPED_UNICODE);

A
Alexander, 2019-02-09
@NeiroNx

JSON.parse('{"title":"(\u043c\u0430\u0441\u0441\u0430 3,9 \u0442\u043d, \u043e\u0442\u0432\u0430\u043b 0,7 \u043c3)","characteristics":"{\"1\":{\"title\":\"\\u042d\\u043a\\u0441\\u043f\\u043b\\u0443\\u0430\\u0442\\u0430\\u0446\\u0438\\u043e\\u043d\\u043d\\u0430\\u044f \\u043c\\u0430\\u0441\\u0441\\u0430:\",\"value\":\"3940 \\u043a\\u0433\"},\"2\":{\"title\":\"\\u041c\\u043e\\u0449\\u043d\\u043e\\u0441\\u0442\\u044c \\u0434\\u0432\\u0438\\u0433\\u0430\\u0442\\u0435\\u043b\\u044f:\",\"value\":\"32 \\u043a\\u0412\\u0442 (43 \\u043b.\\u0441.)\"},\"3\":{\"title\":\"\\u0420\\u0430\\u0437\\u043c\\u0435\\u0440 \\u043e\\u0442\\u0432\\u0430\\u043b\\u0430:\",\"value\":\"2170\\u0445820 \\u043c\\u043c\"},\"4\":{\"title\":\"\\u041e\\u0431\\u044a\\u0435\\u043c \\u043e\\u0442\\u0432\\u0430\\u043b\\u0430:\",\"value\":\"0,7 \\u043c3\"},\"5\":{\"title\":\"\\u0413\\u043b\\u0443\\u0431\\u0438\\u043d\\u0430 \\u0440\\u0435\\u0437\\u043a\\u0438:\",\"value\":\"355 \\u043c\\u043c\"},\"6\":{\"title\":\"\\u0428\\u0438\\u0440\\u0438\\u043d\\u0430 \\u0431\\u0430\\u0448\\u043c\\u0430\\u043a\\u0430:\",\"value\":\"300 \\u043c\\u043c\"},\"7\":{\"title\":\"\\u0413\\u0430\\u0431\\u0430\\u0440\\u0438\\u0442\\u044b (\\u0414\\u0445\\u0428\\u0445\\u0412):\",\"value\":\"3365\\u04451310\\u04452450 \\u043c\\u043c\"}}"}'.replace(':"{',":{").replace('\\"','"').replace('\\\\u','\\u').replace('}}"}','}}}'))

In php, some kind of curve parser - neither the browser nor the python could parse without replacements ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question