Using Format and Indent on JSON file adds unicode entities

Oxygen general issues.
mpaluch
Posts: 1
Joined: Fri May 20, 2022 9:42 pm

Using Format and Indent on JSON file adds unicode entities

Post by mpaluch »

Hello,

When I use the "Format and Indent" function on a JSON file, XML editor is converting some characters into their Java unicode entities. For example the following original JSON content:

Code: Select all

{"status":"FOUND","doi":"10.1002/(SICI)1099-0739(199808/09)12:8/9<635::AID-AOC772>3.0.CO;2-J","citations":[{"doi":"10.1002/(SICI)1099-0739(199808/09)12:8/9<635::AID-AOC772>3.0.CO;2-J","style":"chicago-fullnote-bibliography","locale":"en-GB","text":"Minhas, R., D. S. Forsyth, and B. Dawson. ‘Synthesis and Characterization of Arsenobetaine and Arsenocholine Derivatives’. Applied Organometallic Chemistry 12, no. 8–9 (August 1998): 635–641. doi:10.1002/(sici)1099-0739(199808/09)12:8/9<635::aid-aoc772>3.0.co;2-j."}]}
Is converted to this:

Code: Select all

{
    "status": "FOUND",
    "doi": "10.1002/(SICI)1099-0739(199808/09)12:8/9<635::AID-AOC772>3.0.CO;2-J",
    "citations": [
        {
            "doi": "10.1002/(SICI)1099-0739(199808/09)12:8/9<635::AID-AOC772>3.0.CO;2-J",
            "style": "chicago-fullnote-bibliography",
            "locale": "en-GB",
            "text": "Minhas, R., D. S. Forsyth, and B. Dawson. \u2018Synthesis and Characterization of Arsenobetaine and Arsenocholine Derivatives\u2019. Applied Organometallic Chemistry 12, no. 8\u20139 (August 1998): 635\u2013641. doi:10.1002/(sici)1099-0739(199808/09)12:8/9<635::aid-aoc772>3.0.co;2-j."
        }
    ]
}
The characters , , and are converted into \u2018, \u2019, and \u2013 respectively. I cannot find any option in the preferences to disable this behaviour. Is this expected? Can this be disabled? I'm running build 2022041507 of version 24.1, with the default OpenJDK JRE on Windows 10 x64.

Thanks,
Marcin
florin_nica
Posts: 32
Joined: Wed Sep 09, 2020 3:17 pm

Re: Using Format and Indent on JSON file adds unicode entities

Post by florin_nica »

Hello,

Thank you for your report.
We are aware of this issue, and it has already been fixed in the current development stream. The fix will be available in the next maintenance build, scheduled for the near future.

At the moment, there is no option to control the described behavior. If you don't want to wait until the build is ready, and need the fix sooner, you can send us an email at support@oxygenxml.com, and receive custom support.

Regards,
Florin
Post Reply