XML'den JSON'a Dönüştürücü

Ters dönüşüme mi ihtiyacınız var?
JSON to XML Converter

XML Girdisi

1

JSON Çıktısı

JSON biçimine dönüştürmek için XML verisi girin

Dönüştürülen veriler burada görünecek

XML'i JSON'a nasıl dönüştürürsünüz (online)

  1. Adım 1 – XML'i yapıştırın veya yükleyin

    XML'i sol editöre yapıştırın veya bir .xml dosyası yükleyin.

  2. Adım 2 – Yapıyı inceleyin

    Düzenlerken araç XML'i ayrıştırır ve öğeler, öznitelikler ve iç içe düğümleri yansıtan bir JSON ağacına dönüştürür.

  3. Adım 3 – JSON çıktısını gözden geçirin

    JSON sonucu sağda okunabilir şekilde biçimlendirilir. XML hataları editörlerin üstünde gösterilir.

  4. Adım 4 – JSON'u kopyalayın veya indirin

    Dönüştürülen JSON'u panoya kopyalayın veya API/test/uygulamalar için .json olarak indirin.

Quick tips for XML to JSON

  • Well-formed XML is required; unclosed tags or invalid characters will cause parse errors.
  • Attributes are usually mapped with a prefix (like @), and text nodes with #text.
  • After converting, you can generate JSON Schema or TypeScript types for the resulting JSON structure.
Example: XML to JSON
<!-- XML input -->
<order id="ORD-1001">
  <customer name="Maeve" email="[email protected]" />
  <item sku="SKU-001">Wireless Mouse</item>
  <item sku="SKU-002">Mechanical Keyboard</item>
</order>

// JSON output (simplified)
{
  "order": {
    "@id": "ORD-1001",
    "customer": {
      "@name": "Maeve",
      "@email": "[email protected]"
    },
    "item": [
      { "@sku": "SKU-001", "#text": "Wireless Mouse" },
      { "@sku": "SKU-002", "#text": "Mechanical Keyboard" }
    ]
  }
}

Related XML & JSON tools

Work with XML and JSON together using these additional tools.

Sık Sorulan Sorular

What XML features are supported in the conversion?

The converter supports standard XML elements, attributes, text content, and CDATA sections. It handles nested structures and converts them to appropriate JSON objects and arrays.

How are XML attributes handled in the JSON output?

XML attributes are typically converted to JSON properties with a special prefix (like '@') to distinguish them from element content, or they may be merged into the element's JSON representation depending on the conversion logic.

Can I convert large XML files?

Yes, the converter can handle large XML files, but performance may vary based on file size and complexity. For very large files, consider breaking them into smaller chunks if possible.

What happens to XML namespaces during conversion?

XML namespaces are preserved in the JSON output, typically as part of the element names or as separate properties. The exact handling depends on the conversion implementation.

XML'den JSON'a Dönüştürücü | JSONSwiss