We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3daf092 commit 8ab4bbaCopy full SHA for 8ab4bba
converter.py
@@ -110,30 +110,4 @@ def main() -> None:
110
111
112
if __name__ == "__main__":
113
- # main()
114
-
115
- json_data = {
116
- "person": {
117
- "name": "John Doe",
118
- "age": 30,
119
- "hobbies": ["reading", "cycling", "hiking"]
120
- }
121
122
- xml_output = json_to_xml(json_data, root_name="data")
123
- print("XML Output:\n", xml_output)
124
125
- xml_data = """
126
- <data>
127
- <person>
128
- <name>John Doe</name>
129
- <age>30</age>
130
- <hobbies>
131
- <item>reading</item>
132
- <item>cycling</item>
133
- <item>hiking</item>
134
- </hobbies>
135
- </person>
136
- </data>
137
- """
138
- json_output = xml_to_json(xml_data)
139
- print("\nJSON Output:\n", json.dumps(json_output, indent=4))
+ main()
0 commit comments