On Friday, January 24, 2014 2:51:12 PM UTC+5:30, Frank Millman wrote:

> Incidentally, I would take issue with the comment that 'JSON is easily 
> readable by humans (UNLIKE XML)'. Here is a more complete example of my 
> 'choices' definition.

> [true, true, [["admin", "System administrator", [], []], ["ind", 
> "Individual", [["first_name", true], ["surname", true]], [["first_name", " 
> "], ["surname", ""]]], ["comp", "Company", [["comp_name", true], ["reg_no", 
> true], ["vat_no", false]], [["comp_name", ""]]]]]

> You can read it, but what does it mean?

> This is what it would look like if I stored it in XML -


> More verbose - sure. Less human-readable - I don't think so.

> Also, intuitively one would think it would take much longer to process the 
> XML version compared with the JSON version. I have not done any benchmarks, 
> but I use lxml, and I am astonished at the speed. Admittedly a typical 
> form-processor spends most of its time waiting for user input. Even so, for 
> my purposes, I have never felt the slightest slowdown caused by XML.

> Comments welcome.

Of json/XML/yml I prefer yml because it has the terseness of json and the
structuredness of xml -- well almost

The flipside is that pyyaml needs to be installed unlike json.
But then you are installing lxml anyway
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to