evidens / json2csv

Converts JSON files to CSV (pulling data from nested structures). Useful for Mongo data
MIT License
264 stars 97 forks source link

creating outline for mailchimp api json output file #39

Open latitude4all opened 5 years ago

latitude4all commented 5 years ago

I am trying to use json2csv to convert output from mailchimp api, but I am getting an error

python gen_outline.py --collection nodes text.json -o templatejsonoutput.json

ValueError: Expecting property name: line 1 column 2 (char 1)

The original file text.json has a structure like that:

{'members': [{'id': 'xxxxx', 'email_address': 'xxx@xxx.com', 'unique_email_id': 'xxx', 'email_type': 'html', 'status': 'unsubscribed', 'unsubscribe_reason': 'N/A (Unsubscribed by admin)', 'merge_fields': {'FNAME': '', 'LNAME': '', 'MMERGE3': ''}, 'stats': Do you know why I am getting this error? Thank you very much for any help.