JSON ↔ XML Converter
Convert JSON to XML and back - best-effort, with a documented convention
0 chars · 0 lines
0 chars
Conversion convention
JSON → XML
-
The document is wrapped in a
<root>element - Arrays become repeated sibling elements, one per item
- Keys that are invalid XML names are sanitized (spaces and special characters become underscores)
- Null becomes an empty element
XML → JSON
-
Attributes become
@_namekeys - Elements with only text become plain values (numbers, booleans and null are detected)
-
Elements with mixed text and children use a
#textkey - Repeated sibling elements become an array
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect