Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Created June 16, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Allwin12/0521e8bf605111fd2e376f2e227a3770 to your computer and use it in GitHub Desktop.
Save Allwin12/0521e8bf605111fd2e376f2e227a3770 to your computer and use it in GitHub Desktop.
from json2xml import json2xml
from json2xml.utils import readfromurl, readfromstring, readfromjson
data = '''{
"name": "John",
"job": "Engineer",
"dob": "23-04-1986",
"age": 34,
"country": "Brazil"
}'''
data = readfromstring(data)
print(json2xml.Json2xml(data).to_xml())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment