Loona Automation logoLoona Developer Tools
Home › डेटा कन्वर्टर

XML से JSON कन्वर्टर

संक्षेप में: XML paste करें और JSON पाएँ: attributes @-prefixed keys बनते हैं, repeated sibling elements arrays बनते हैं, और element text value बनता है (numbers और booleans typed)।
🔒 Design से निजी: सब कुछ इस device पर आपके browser में चलता है। आपका input कभी server पर upload नहीं होता।

Example

Input:

<person><name>Ali</name><age>30</age></person>

Output:

{
  "person": {
    "name": "Ali",
    "age": 30
  }
}

इस converter के बारे में

यह converter XML को एक असली parser (regex नहीं) से parse करता है और इसे standard conventions से JSON में map करता है: बिना attributes और बिना children वाला element उसका text value बनता है, obvious numbers और booleans typed के साथ; attributes @name keys के रूप में सुरक्षित रहते हैं ताकि कुछ न खोए; tag साझा करने वाले siblings उस tag के नीचे एक array में collapse होते हैं; mixed content अपना text #text के नीचे रखता है। वे conventions output को predictable और इस site के JSON से XML converter के साथ round-trippable बनाते हैं। Namespaces tag names में literally रखे जाते हैं (prefix:local), क्योंकि उन्हें चुपके से हटाना वह तरीका है जिससे data pipelines अर्थ खोती हैं।

अक्सर पूछे जाने वाले सवाल

Single child array क्यों नहीं बना?

एक occurrence को lone element से अलग नहीं किया जा सकता; arrays दो या अधिक same-tag siblings से बनते हैं — XML-to-JSON mapping की universal अस्पष्टता।

Comments और XML declaration का क्या होता है?

वे data purposes के लिए structural noise हैं और हटा दिए जाते हैं; root element top-level key बन जाता है।

संबंधित Developer Tools

इस tool को अपनी website पर embed करें — मुफ़्त

इस tool को अपनी website या blog पर जोड़ें — यह पूरी तरह मुफ़्त है, कोई साइन-अप नहीं चाहिए, और हमेशा latest version दिखाता है। नीचे का code copy करें और अपनी page पर वहाँ paste करें जहाँ आप tool को दिखाना चाहते हैं। Embed के नीचे छोटी “Powered by Loona Automation” credit line रखना इस tool को मुफ़्त रखने में मदद करता है — लेकिन आप इसे style या remove करने के लिए स्वतंत्र हैं; tool किसी भी तरह काम करता है।