XML para JSON
Converte elementos e atributos XML em JSON.
XML para JSON
Como usar XML para JSON
XML to JSON converts well-formed XML into formatted JSON that keeps both elements and attributes. Attributes appear as keys prefixed with @_, repeated sibling elements become arrays, and element text that looks like a number is converted to a number. Invalid XML is reported with a line number, and DOCTYPE or entity declarations are refused.
- Cole a fonte no editor de entrada ou carregue o exemplo integrado.
- Verifique o formato de origem antes de executar a operação.
- Execute a conversão de XML para JSON, revise a saída e use os controles disponíveis para copiar ou baixar.
O que esta ferramenta suporta
Converte elementos e atributos XML em JSON.
Limites e processamento
As operações de texto aceitam geralmente até 2,000,000 caracteres. Analisadores, geradores e fórmulas individuais aplicam limites adicionais mostrados pelos seus controles.
Fonte de exemplo
<root><name>ToolCabana</name><count>2</count></root>
Perguntas frequentes
How are XML attributes shown in JSON?
Attributes are kept and appear on their element object as keys starting with @_, so id="1" becomes "@_id": "1". Attribute values stay strings.
What happens to repeated XML elements when converting to JSON?
Sibling elements with the same name are grouped into a JSON array under that name. A single occurrence stays a plain value or object.
Why did XML to JSON remove leading zeros?
Element text that looks like a number is parsed as a JSON number, so a value such as 007 becomes 7. Keep codes as attributes if their exact text matters.
Onde minha entrada é processada?
Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.
Quais são os limites de entrada?
As operações de texto aceitam geralmente até 2,000,000 caracteres. Analisadores, geradores e fórmulas individuais aplicam limites adicionais mostrados pelos seus controles.