Convertitore da XML a JSON
Converte i documenti XML in JSON. Gli attributi diventano chiavi con prefisso @; i tag ripetuti diventano array.
Come usare questo strumento
- 1
Paste or type your XML into the input box.
- 2
Read the converted JSON in the output panel below, which updates as you type.
- 3
If the XML is malformed, fix the error shown in red and the output will reappear.
- 4
Select the JSON from the output panel to copy it into your project.
Che cos'è il convertitore da XML a JSON?
Passare da XML a JSON comporta una perdita di informazioni sotto alcuni aspetti: XML supporta spazi dei nomi, istruzioni di elaborazione e sezioni CDATA che non hanno equivalenti diretti in JSON. Questo convertitore gestisce il 90% dei casi: elementi annidati, attributi (con prefisso @) e contenuto di testo (#text). Per l'XML complesso può essere necessaria una libreria dedicata.
Casi d'uso comuni
Inspect a SOAP or legacy XML API response as JSON before wiring it into a JavaScript front end.
Convert an RSS or Atom feed snippet into JSON to prototype a parser quickly.
Turn a config file or build manifest written in XML into JSON to eyeball its structure.
Pull values out of an XML sitemap or data export when a JSON shape is easier to traverse.
Teach or learn how attributes, repeated tags, and text nodes map between the two formats.
Sanity-check that a small XML payload is well-formed, since malformed input shows a parser error.
Domande frequenti
Che cos'è il prefisso @?▼
Strumenti correlati
Decodificatore di JWT
Decodifica i JSON Web Token (JWT) all'istante. Viene eseguito nel suo browser: i token non lasciano mai il suo dispositivo, quindi è sicuro usarlo con segreti di produzione.
Formattatore e validatore di JSON
Formatta, valida e minifica JSON online. Funziona interamente nel suo browser: i suoi dati non lasciano mai il suo dispositivo.
Formattatore di XML
Formatta e abbellisce i documenti XML. Utile per SOAP, sitemap, feed RSS e file di configurazione.
Codificatore e decodificatore Base64
Codifica le stringhe in Base64 o decodifica il Base64 in testo. Rispetta la sua privacy: viene eseguito nel suo browser.
Codificatore e decodificatore di URL
Converte il testo in codifica sicura per URL (codifica percentuale) e viceversa. Utile per stringhe di query, reindirizzamenti e flussi OAuth.
Codificatore e decodificatore di entità HTML
Converte i caratteri speciali in entità HTML (&, <, ecc.) e viceversa. Utile per incorporare testo in HTML in modo sicuro.