Vai al contenuto principale
CuteJSON
↑↓ Naviga Enter Seleziona Esc Chiudi

JSON to XML Converter

Convert between JSON and XML without either document leaving your browser.

Torna a tutti gli strumenti
Namespaces and custom mapping

These settings change how attributes, text and namespace prefixes cross between JSON and XML. The defaults match the mapping described above.

Scorciatoie da tastiera

Funzionano dove l'azione corrispondente esiste in questa pagina.

Apri la tavolozza comandi
Ctrl/Cmd + K
Esegui l'azione principale
Ctrl/Cmd + Enter
Formatta
Ctrl/Cmd + Shift + F
Minifica
Ctrl/Cmd + Shift + M
Copia output
Ctrl/Cmd + Shift + C
Apri file
Ctrl/Cmd + Shift + O
Scarica output
Ctrl/Cmd + S
Chiudi questa finestra
Esc
Apri questa finestra
F1 / ?

Dati locali

Tutto qui sotto e memorizzato solo in questo browser.

Bozze non salvate
Strumenti con opzioni ricordate

File aperti di recente

    Nessun file aperto ancora.

    Condividi via link

    Il contenuto e impacchettato nella parte dopo il #.

    Condivide la prima input in questa pagina.

    Niente da condividere ancora.

    JSON

    Carica da un URL

    Recupera l'URL dal tuo browser.

    XML

    Il risultato appare qui.

    Funziona interamente nel tuo browser.

    Su questo strumento

    XML has no single mapping onto JSON, so this tool picks one and states it on the page instead of pretending there is a natural one. Writing, an object becomes an element per member and an array becomes repeated sibling elements under a root element whose name you choose, because JSON has nothing that names an object the way a root element does. A member name that is not a legal XML element name stops the conversion and is named. An attribute becomes a key prefixed with @ and text sitting next to child elements becomes a #text key, and neither @ nor # is a legal XML name character, so a JSON key can never collide with them. A null becomes an empty element, and so do an empty object, an empty array and an empty string, because XML has one shape for nothing and cannot tell them apart, so they all read back as null. Reading, every value is a string, because XML records no types and guessing them is how a postcode becomes a number. A repeated element name becomes an array. The reader handles comments, CDATA, entity references and a DOCTYPE, and reports anything else with its position. The attribute prefix, the text key and namespace handling are all configurable in Namespaces and custom mapping, for a document that uses a different convention.

    Come usare

    1. Choose a direction, then paste your document into the left pane or load the sample.
    2. Press Convert. Writing, you can name the root element first.
    3. Copy the result or download it as a file.