Convert JSON5 to XML
Turn JSON5 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 JSON5 files on the dialor turn it to pick what to do
JSON5 becomes one XML file.Objects turn into elements under a single root, and every value becomes text.
What you get
One XML file. Objects become elements inside one root element, and every value is written as text. Characters that a tag name cannot hold are turned into underscores.
A list repeats its element, so each item in the list gets its own element with the same name.
Attributes and text
Keys that start with @ become attributes. The value of such a key is written as text, and a list or an object is written as JSON text. A key named #text becomes the element's own text.
What changes
Comments are dropped. JSON5 numbers become plain numbers.
An empty list disappears, because a list is written as repeated elements and an empty list has none. A list of lists is flattened.
To go the other way, use XML to JSON5.
JSON5 and XML.What each format is.
The formats
JSON5
JSON with comments, trailing commas and unquoted keys.
- Extensions
- .json5
- MIME type
- application
/json5 - Kind
- Text and data
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
In your code.The same JSON5 to XML conversion through the API, for your app or your agent.
$ cv convert report.json5 report.xml$ cv convert report.json5 report.xmlQuestions.What people ask about JSON5 to XML.
Each key becomes an element name. Characters a tag name cannot hold are turned into underscores.
Start the key with @. It becomes an attribute, and its value is written as text.
It disappears from the XML. A list is written as repeated elements, and an empty list has none.
No. Comments are dropped.