JSON to XML
See how a JSON string and a boolean appear in a UTF-8 XML document.
See how a JSON string and a boolean appear in a UTF-8 XML document.
How to use
- Load the object containing Tea & coffee and active set to false.
- Convert the sample and open the XML source in a text editor.
- Inspect the encoding declaration and the name and active elements beneath root.
Worked example
Input
{"name":"Tea & coffee","active":false}Expected result
<?xml version="1.0" encoding="UTF-8"?>
<root>
<name>Tea & coffee</name>
<active>false</active>
</root>Check the result
The name should contain Tea & coffee and active should contain false.