[OT] is JSON all that great? - was Re: API Help

Gene Heskett gheskett at shentel.net
Thu Jun 15 11:25:56 EDT 2017


On Thursday 15 June 2017 01:10:26 Marko Rauhamaa wrote:

> Chris Angelico <rosuav at gmail.com>:
> > XML is thus poorly suited to *most* forms of data,
>
> Correct.
>
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <spam>
> >   <asdf>aa</asdf>
> >   <qwer>qq</qwer>
> >   <qwer>qw</qwer>
> >   <qwer>qe</qwer>
> >   <asdf>as</asdf>
> > </spam>
> >
> > What does this represent? A generic XML parser has to cope with it.
> > I gave this to a few XML-to-JSON converters, and they all
> > interpreted it as some variant of
> > {"asdf":["aa","as"],"qwer":["qq","qw","qe"]}
>
> It's worse than that. For a *generic* parser, it should be something
> like:
>
>    {
>        "spam" : [
>            "  \n",
>            { "asdf" : [ "aa" ] },
>            "  \n",
>            { "qwer" : [ "qq" ] },
>            "  \n",
>            { "qwer" : [ "qw" ] },
>            "  \n",
>            { "qwer" : [ "qe" ] },
>            "  \n",
>            { "asdf" : [ "as" ] },
>            "\n"
>        ]
>    }
>
> > XML just needs to die.
>
> Thankfully, that seems to be happening.

Slowly please, it is still being heavily used in the custom gui creation 
field.  We would love to have gladevcp back in a usable state, but it 
was dropped by gtk3 and has never been given any TLC since, so those of 
us creating industrial gui's are stuck doing it in pyvcp and xml.  If 
you intend to kill off xml, then we had better have another, even 
prettier replacement already available. We don't today, have anything 
that can replace pyvcp translating a .xml in its broad utility.


> Marko


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



More information about the Python-list mailing list