JSON Object to CSV file

ryguy7272 ryanshuell at gmail.com
Thu Aug 20 03:54:06 CEST 2015


On Wednesday, June 17, 2015 at 11:00:24 AM UTC-4, kbtyo wrote:
> I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with each header field. Is there a best practice for working with this? Ideally I would like to recursively iterate through the key value pairs. Thank you in advance. I am using Python 3.4 on Windows. My editor is Sublime 2. 
> 
> {
> "CF": {
> "A": "5",
> "FEC": "1/1/0001 12:00:00 AM",
> "TE": null,
> "Locator": null,
> "Message": "Transfer Fee",
> "AT": null,
> "FT": null,
> "FR": "True",
> "FY": null,
> "FR": null,
> "FG": "0",
> "Comment": null,
> "FUD": null,
> "cID": null,
> "GEO": null,
> "ISO": null,
> "TRID": null,
> "XTY": "931083",
> "ANM": null,
> "NM": null
> },
> "CF": "Fee",
> "ID": "2"
> }



Please see this link.
https://pypi.python.org/pypi/xmlutils

I'm not sure if that will help you.  I just found it toady.  Also, I'm pretty new to Python.  Anyway, hopefully, it gets you going in the right direction...


More information about the Python-list mailing list