Google comes up with this: json2excel.
Or write your own little application.
EDIT
I decided to be nice and write a python3 application for you. Use on the command line like this python jsontoxml.py infile1.json infile2.json
and it will output infile1.json.xml and infile2.json.xml.
#!/usr/bin/env python3
import json
import sys
import re
from xml.dom.minidom import parseString
if len(sys.argv) < 2:
print("Need to specify at least one file.")
sys.exit()
ident = " " * 4
for infile in sys.argv[1:]:
orig = json.load(open(infile))
def parseitem(item, document):
if type(item) == dict:
parsedict(item, document)
elif type(item) == list:
for listitem in item:
parseitem(listitem, document)
else:
document.append(str(item))
def parsedict(jsondict, document):
for name, value in jsondict.items():
document.append("<%s>" % name)
parseitem(value, document)
document.append("</%s>" % name)
document = []
parsedict(orig, document)
outfile = open(infile + ".xml", "w")
xmlcontent = parseString("".join(document)).toprettyxml(ident)
#http://stackoverflow.com/questions/749796/pretty-printing-xml-in-python/3367423#3367423
xmlcontent = re.sub(">\n\s+([^<>\s].*?)\n\s+</", ">\g<1></", xmlcontent, flags=re.DOTALL)
outfile.write(xmlcontent)
Sample input
{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
},
"text": {
"data": "Click Here",
"size": 36,
"style": "bold",
"name": "text1",
"hOffset": 250,
"vOffset": 100,
"alignment": "center",
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
}
}}
Sample output
<widget>
<debug>on</debug>
<window title="Sample Konfabulator Widget">
<name>main_window</name>
<width>500</width>
<height>500</height>
</window>
<image src="Images/Sun.png" name="sun1">
<hOffset>250</hOffset>
<vOffset>250</vOffset>
<alignment>center</alignment>
</image>
<text data="Click Here" size="36" style="bold">
<name>text1</name>
<hOffset>250</hOffset>
<vOffset>100</vOffset>
<alignment>center</alignment>
<onMouseUp>
sun1.opacity = (sun1.opacity / 100) * 90;
</onMouseUp>
</text>
</widget>