{"id":15700239,"url":"https://github.com/edsu/json2xml","last_synced_at":"2025-09-04T05:41:24.709Z","repository":{"id":4898515,"uuid":"6054514","full_name":"edsu/json2xml","owner":"edsu","description":"simplistic json -\u003e xml converter","archived":false,"fork":false,"pushed_at":"2017-01-05T15:29:36.000Z","size":10,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T17:31:12.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-03T02:24:13.000Z","updated_at":"2022-08-22T06:38:04.000Z","dependencies_parsed_at":"2022-08-18T00:11:36.624Z","dependency_job_id":null,"html_url":"https://github.com/edsu/json2xml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edsu/json2xml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fjson2xml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fjson2xml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fjson2xml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fjson2xml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edsu","download_url":"https://codeload.github.com/edsu/json2xml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edsu%2Fjson2xml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273557120,"owners_count":25126743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T19:46:57.285Z","updated_at":"2025-09-04T05:41:24.672Z","avatar_url":"https://github.com/edsu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"json2xml\n========\n\nA simplistic JSON to XML converter, created mainly as a way to kill time\none evening after a\n[tweet](https://twitter.com/pabinkley/status/253279453738835969)\nfrom @pbinkley. Yes, you are entitled to ask why I would ever want to \nconvert JSON to XML. No, I'm not going to provide an answer :-)\n\nExample\n-------\n\nFrom the command line:\n\n    % ./json2xml.py tweet.json | xmllint --format - \u003e tweet.xml\n\nOr from your program:\n\n```python\n\nfrom json2xml import json2xml\n\nprint json2xml(\"tweet.json\", tag_name=\"tweet\")\n``` \n\nOr if you have a python data structure created by something like json.loads\nand you would like xml for it, get a TreeBuilder for it:\n\n```python\n\nfrom json2xml import data2builder\nfrom xml.etree.ElementTree import tostring\n\ndata = {\"foo\": \"bar\", \"baz\": [1, 2, 3]}\nbuilder = data2builder(data, tag_name=\"data\")\ndoc = builder.close()\nprint tostring(doc)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedsu%2Fjson2xml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedsu%2Fjson2xml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedsu%2Fjson2xml/lists"}