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

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

संक्षेप में: JSON को well-formed XML में बदलें: root element name चुनें, nested objects nested elements बनते हैं, arrays repeated elements बनते हैं, और @ से शुरू होने वाली keys attributes बनती हैं।
🔒 Design से निजी: सब कुछ इस device पर आपके browser में चलता है। आपका input कभी server पर upload नहीं होता।

Example

Input:

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

Output:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <person>
    <name>Ali</name>
    <age>30</age>
  </person>
</root>

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

JSON और XML डेटा को अलग model करते हैं — JSON में arrays और types हैं, XML में attributes और text — इसलिए हर converter conventions बनाता है, और यह अपने documents करता है: object keys element names बन जाती हैं; किसी key के नीचे की array उस element को दोहराती है; @ से शुरू होने वाली key उसके element का attribute बन जाती है; #text children के साथ text content set करता है। Values XML-escaped होती हैं। Mapping इस site के XML से JSON converter के साथ round-trip करती है, जो mirror-image conventions उपयोग करता है। Element names valid XML names होने चाहिए (पहले character के बाद letters, digits, - _ .) — spaces या slashes वाली JSON keys को पहले rename करना होगा, जो XML की ही असली constraint है, इस tool की नहीं।

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

Arrays कैसे बदलती हैं?

एक ही tag वाले repeated elements के रूप में: {"b": [1, 2]} <b>1</b><b>2</b> बन जाता है।

क्या मैं attributes control कर सकता हूँ?

हाँ — object के अंदर key को @ से prefix करें और यह उस element का attribute बन जाता है child element के बजाय।

संबंधित 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 किसी भी तरह काम करता है।