On 2011-11-29, Stefan Behnel wrote:
> Adam Funk, 29.11.2011 13:57:
>> On 2011-11-28, Stefan Behnel wrote:
>>> If the name "big_json" is supposed to hint at a large set of data, you may
>>> want to use something other than minidom. Take a look at the
>>> xml.etree.cElementTree module instead, whic
Adam Funk, 29.11.2011 13:57:
On 2011-11-28, Stefan Behnel wrote:
Adam Funk, 25.11.2011 14:50:
Then I recurse through the contents of big_json to build an instance
of xml.dom.minidom.Document (the recursion includes some code to
rewrite dict keys as valid element names if necessary)
If the nam
On 2011-11-28, Steven D'Aprano wrote:
> On Fri, 25 Nov 2011 13:50:01 +, Adam Funk wrote:
>
>> I'm converting JSON data to XML using the standard library's json and
>> xml.dom.minidom modules. I get the input this way:
>>
>> input_source = codecs.open(input_file, 'rb', encoding='UTF-8',
>> er
On 2011-11-28, Stefan Behnel wrote:
> Adam Funk, 25.11.2011 14:50:
>> I'm converting JSON data to XML using the standard library's json and
>> xml.dom.minidom modules. I get the input this way:
>>
>> input_source = codecs.open(input_file, 'rb', encoding='UTF-8',
>> errors='replace')
>
> It doesn
Adam Funk, 25.11.2011 14:50:
I'm converting JSON data to XML using the standard library's json and
xml.dom.minidom modules. I get the input this way:
input_source = codecs.open(input_file, 'rb', encoding='UTF-8', errors='replace')
It doesn't make sense to use codecs.open() with a "b" mode.
On Fri, 25 Nov 2011 13:50:01 +, Adam Funk wrote:
> I'm converting JSON data to XML using the standard library's json and
> xml.dom.minidom modules. I get the input this way:
>
> input_source = codecs.open(input_file, 'rb', encoding='UTF-8',
> errors='replace') big_json = json.load(input_sour
I'm converting JSON data to XML using the standard library's json and
xml.dom.minidom modules. I get the input this way:
input_source = codecs.open(input_file, 'rb', encoding='UTF-8', errors='replace')
big_json = json.load(input_source)
input_source.close()
Then I recurse through the contents of