Pular para o conteudo principal
CuteJSON
↑↓ Navegar Enter Selecionar Esc Fechar

JSON to XML Converter

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

Voltar para todas as ferramentas
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.

Atalhos de teclado

Estes funcionam onde a acao correspondente existe nesta pagina.

Abrir a paleta de comandos
Ctrl/Cmd + K
Executar a acao principal
Ctrl/Cmd + Enter
Formatar
Ctrl/Cmd + Shift + F
Minimizar
Ctrl/Cmd + Shift + M
Copiar saida
Ctrl/Cmd + Shift + C
Abrir arquivo
Ctrl/Cmd + Shift + O
Baixar saida
Ctrl/Cmd + S
Fechar este dialogo
Esc
Abrir este dialogo
F1 / ?

Dados locais

Tudo abaixo e armazenado apenas neste navegador, neste dispositivo. Nada e enviado a lugar nenhum, e fechar este dialogo nao e necessario para que isso continue verdade.

Rascunhos nao salvos
Ferramentas com opcoes lembradas

Arquivos abertos recentemente

    Nenhum arquivo aberto ainda neste dispositivo.

    Compartilhar via link

    O conteudo e empacotado na parte do link apos o #, que navegadores nunca enviam a um servidor.

    Compartilha a primeira entrada nesta pagina.

    Nada para compartilhar ainda.

    JSON

    Carregar de uma URL

    Busca a URL diretamente do seu navegador.

    XML

    O resultado aparece aqui.

    Funciona inteiramente no seu navegador.

    Sobre esta ferramenta

    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.

    Como usar

    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.