JSON Object to CSV File Troubleshooting

Denis McMahon denismfmcmahon at gmail.com
Sun Jun 21 17:06:05 EDT 2015


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 they face.
> 
> 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 successful with this (the following is rather
> lengthy):

No, step back and force yourself to answer these questions:

Why use JSON as an intermediate step?
What benefit does using JSON as an intermediate step bring me?

I see no evidence in any of your posts that the use of JSON as an 
intermediate format for the data brings any benefit whatsoever, however I 
have seen evidence that it may be introducing errors and potential data 
loss, and it is certainly adding coding complexity.

None of these are good reasons to do it, and all of them are good reasons 
not to do it.

If your data is in XML and your requirement is for CSV, then you should 
be converting from XML to CSV.

Also stop posting reams of code. No-one is reading it. If you have a 
specific error you need to fix, then post a shortest possible example of 
code that generates the error. This should never be more than about 10 
lines.

-- 
Denis McMahon, denismfmcmahon at gmail.com



More information about the Python-list mailing list