Convert JSONC to XML
Turn JSONC files into XML. Objects become elements inside one root element and every value becomes text, with characters a tag name cannot hold turned into underscores.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSONC files on the dialor turn it to pick what to do
JSONC data written as one XML file.Objects become elements, and every value becomes text.
What you get
One XML file. Your data sits inside a single root element, and each object becomes an element with its keys as child elements.
Every value is written as text. Characters that a tag name cannot hold are turned into underscores in the key names.
Attributes and text
Keys that start with @ become attributes. Lists and objects under such a key are written as JSON text inside the attribute. A key named #text becomes the element's own text.
What changes or is left behind
A list repeats its element, once for each item. An empty list therefore disappears, and a list of lists is flattened into one run of repeated elements.
Comments and trailing commas are dropped. The XML holds only the data.
To go the other way, use XML to JSONC.
JSONC and XML.What each format is.
The formats
JSON with Comments
JSON that allows comments, as in editor and TypeScript configuration files.
- Extensions
- .jsonc
- MIME type
- text
/x -jsonc - Kind
- Text and data
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
In your code.The same JSONC to XML conversion through the API, for your app or your agent.
$ cv convert report.jsonc report.xml$ cv convert report.jsonc report.xmlQuestions.What people ask about JSONC to XML.
They are dropped. The XML file holds only the data.
A list repeats its element, once for each item. An empty list leaves nothing behind, and a list of lists is flattened.
No. Every value becomes text in the XML.
Those characters are turned into underscores in the element name.