Re: JSON Object to CSV file

2015-08-19 Thread ryguy7272
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 > w

Re: JSON Object to CSV File Troubleshooting

2015-06-23 Thread Sahlusar
On Tuesday, June 23, 2015 at 2:35:50 AM UTC-4, Denis McMahon wrote: > On Sun, 21 Jun 2015 16:56:27 -0700, Sahlusar wrote: > > > Here is an example XML document that I am working with: > > > You are welcome to contribute and provide me with feedback. Thank you > > for your continued feedback and g

Re: JSON Object to CSV File Troubleshooting

2015-06-22 Thread Denis McMahon
On Sun, 21 Jun 2015 16:56:27 -0700, Sahlusar wrote: > Here is an example XML document that I am working with: > You are welcome to contribute and provide me with feedback. Thank you > for your continued feedback and guidance. Your XML is invalid! You have a closing MO tag with no opening tag. >

Re: JSON Object to CSV File Troubleshooting

2015-06-22 Thread Chris Angelico
On Mon, Jun 22, 2015 at 9:33 AM, Denis McMahon wrote: > This is the sort of data conversion code I generally turn out in a day or > so, it's hardly rocket science as long as you have a clear description of > what is required. If you don't have a clear description of what is > required, you have to

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Sahlusar
On Sunday, June 21, 2015 at 7:34:47 PM UTC-4, Denis McMahon wrote: > On Mon, 22 Jun 2015 00:55:11 +0300, Joonas Liik wrote: > > > In xml for instance this is valid: > > > > > 1 > > > > .. and so is this: > > > > 1 2 > > > > What the OP needs to do is sit down with the XML and work out how

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Sahlusar
On Sunday, June 21, 2015 at 5:56:00 PM UTC-4, Waffle wrote: > On 21 June 2015 at 17:38, Sahlusar wrote: > > > > [snip] > > I do agree with you Denis that this is an unconventional approach. I was > > wondering then that perhaps I should add additional functionality at the > > XML to JSON step? S

Re: JSON Object to CSV file

2015-06-21 Thread Sahlusar
On Sunday, June 21, 2015 at 4:54:27 PM UTC-4, Denis McMahon wrote: > On Sun, 21 Jun 2015 06:57:01 -0700, sahluwalia wrote: > > > On Sunday, 21 June 2015 02:47:31 UTC-4, Denis McMahon wrote: > >> On Wed, 17 Jun 2015 08:00:11 -0700, Saran A wrote: > >> > >> > I would like to have this JSON object

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Denis McMahon
On Mon, 22 Jun 2015 00:55:11 +0300, Joonas Liik wrote: > In xml for instance this is valid: > > 1 > > .. and so is this: > > 1 2 > What the OP needs to do is sit down with the XML and work out how it needs to be represented in CSV terms, and then code that transformation, but it appears

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Joonas Liik
On 21 June 2015 at 17:38, Sahlusar wrote: > > [snip] > I do agree with you Denis that this is an unconventional approach. I was > wondering then that perhaps I should add additional functionality at the XML > to JSON step? So far, with JSON objects without nested lists (as values) I > have been

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Denis McMahon
On Sun, 21 Jun 2015 07:38:13 -0700, Sahlusar wrote: > It is difficult to explain this to someone asynchronously and without an > in person meeting. Moreover, the strict guidelines for disclosing > information make it difficult for me to explain the client's > requirements and the problems that the

Re: JSON Object to CSV file

2015-06-21 Thread Denis McMahon
On Sun, 21 Jun 2015 06:57:01 -0700, sahluwalia wrote: > On Sunday, 21 June 2015 02:47:31 UTC-4, Denis McMahon wrote: >> On Wed, 17 Jun 2015 08:00:11 -0700, Saran A 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

Re: JSON Object to CSV file

2015-06-21 Thread Sahlusar
On Sunday, 21 June 2015 11:31:44 UTC-4, Ned Batchelder wrote: > On Sunday, June 21, 2015 at 10:54:44 AM UTC-4, Sahlusar wrote: > > > This is a duplicate to the post titled: JSON to CSV Troubleshooting: > > Please don't do that. > > --Ned. My apologies - is it possible to delete one of my posts

Re: JSON Object to CSV file

2015-06-21 Thread Ned Batchelder
On Sunday, June 21, 2015 at 10:54:44 AM UTC-4, Sahlusar wrote: > This is a duplicate to the post titled: JSON to CSV Troubleshooting: Please don't do that. --Ned. -- https://mail.python.org/mailman/listinfo/python-list

Re: JSON Object to CSV file

2015-06-21 Thread Sahlusar
On Sunday, June 21, 2015 at 2:47:31 AM UTC-4, Denis McMahon wrote: > On Wed, 17 Jun 2015 08:00:11 -0700, Saran A 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 asso

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Sahlusar
It is difficult to explain this to someone asynchronously and without an in person meeting. Moreover, the strict guidelines for disclosing information make it difficult for me to explain the client's requirements and the problems that they face. I do agree with you Denis that this is an uncon

Re: JSON Object to CSV file

2015-06-21 Thread Sahlusar
On Sunday, June 21, 2015 at 2:47:31 AM UTC-4, Denis McMahon wrote: > On Wed, 17 Jun 2015 08:00:11 -0700, Saran A 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 asso

Re: JSON Object to CSV File Troubleshooting

2015-06-21 Thread Sahlusar
On Sunday, 21 June 2015 02:54:48 UTC-4, Denis McMahon wrote: > On Thu, 18 Jun 2015 18:47:30 -0700, Sahlusar wrote: > > > I have a conundrum regarding JSON objects and converting them to CSV: > > I think your conundrum is that you've taken on a coding task beyond your > abilities to comprehend,

Re: JSON Object to CSV file

2015-06-21 Thread sahluwalia
On Sunday, 21 June 2015 02:47:31 UTC-4, Denis McMahon wrote: > On Wed, 17 Jun 2015 08:00:11 -0700, Saran A 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 associate

Re: JSON Object to CSV File Troubleshooting

2015-06-20 Thread Denis McMahon
On Thu, 18 Jun 2015 18:47:30 -0700, Sahlusar wrote: > I have a conundrum regarding JSON objects and converting them to CSV: I think your conundrum is that you've taken on a coding task beyond your abilities to comprehend, and as a result not only can you not code it, you can't even adequately d

Re: JSON Object to CSV File Troubleshooting

2015-06-20 Thread Denis McMahon
On Thu, 18 Jun 2015 18:47:30 -0700, Sahlusar wrote: > I have a conundrum regarding JSON objects and converting them to CSV: > > Context > > I am converting XML files to a JSON object (please see snippet below) > and then finally producing a CSV file. Here is a an example JSON object: This is wh

Re: JSON Object to CSV file

2015-06-20 Thread Denis McMahon
On Wed, 17 Jun 2015 08:00:11 -0700, Saran A 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. > { > "CF": { ... > "CF": "Fee", Your js

Re: JSON Object to CSV File Troubleshooting

2015-06-18 Thread Steve Hayes
On Thu, 18 Jun 2015 18:47:30 -0700 (PDT), Sahlusar wrote: >Good Evening, > >I have a conundrum regarding JSON objects and converting them to CSV: That's the THIRD time you've asked this, in three separate threads. Why don't you read the answers you were given the first time? [follow-ups set]

JSON Object to CSV File Troubleshooting

2015-06-18 Thread Sahlusar
Good Evening, I have a conundrum regarding JSON objects and converting them to CSV: Context I am converting XML files to a JSON object (please see snippet below) and then finally producing a CSV file. Here is a an example JSON object: "PAC": {

Re: JSON Object to CSV file

2015-06-18 Thread Sahlusar
On Wednesday, June 17, 2015 at 2:21:05 PM UTC-4, Peter Otten wrote: > Sahlusar wrote: > > > On Wednesday, June 17, 2015 at 11:00:24 AM UTC-4, Saran A 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 th

Re: JSON Object to CSV file

2015-06-17 Thread Peter Otten
Sahlusar wrote: > On Wednesday, June 17, 2015 at 11:00:24 AM UTC-4, Saran A 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

Re: JSON Object to CSV file

2015-06-17 Thread Sahlusar
On Wednesday, June 17, 2015 at 11:00:24 AM UTC-4, Saran A 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 >

JSON Object to CSV file

2015-06-17 Thread Saran A
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 t