• Resolved mykhaylopetrov

    (@mykhaylopetrov)


    By default, JSON data with Cyrillic characters is encoded in utf-8 format in the form of “\u…..” – the so-called “Unicode Escape Equence”. I have all the text data in Cyrillic characters. That is, by default I get:

    <script type=application/ld+json class="aioseo-schema">
    {
        "@context": "https://schema.org/",
        "@type": "WebSite",
        "name": "\u041c\u043e\u0457 \u0421\u0415\u041e \u0434\u0430\u043d\u0456",
    	..........
    }
    </script>

    But I need to get:

    <script type=application/ld+json class="aioseo-schema">
    {
        "@context": "https://schema.org/",
        "@type": "WebSite",
        "name": "Мої СЕО дані",
    	..........
    }
    </script>

    That is, the value of the “name” parameter should be text with Cyrillic symbols, without transformations. This problem is solved by the JSON_UNESCAPED_UNICODE parameter to the json_encode() function.

    How can I achieve this behavior in the Breadcrumbs block?

Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘JSON data with Cyrillic characters’ is closed to new replies.