v = json.loads("{'test':'test'}")

gert gert.cuykens at gmail.com
Mon Jan 26 01:05:59 CET 2009


On Jan 26, 12:40 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> >> But all of this is not JSON.
>
> > Yes it is, you just make it more python dictionary compatible :)
>
> No, what you do is to make it more incompatible with other
> json-implementations. Which defies the meaning of a standard.
>
> Besides, {foo : "bar"} is *not* python dictionary compatible, at least
> not unless you defined foo beforehand, and then there is no guarantee
> that foo is actually as string containing 'foo'.
>
> > What is this json person email address so I can ask that he makes a
> > very small update on his site.
>
> Go try your luck -http://www.json.org/
>
> > Besides if you can make lightweight versions of standards
> >http://docs.python.org/library/xml.dom.minidom.html
>
> minidom is a lightweight version of the DOM-API. But it reads and writes
> standard-conform XML documents.
>
> The same applies for element-tree and lxml.
>
> So it does not serve as a counter-example.

yes it does because adding ' does not mean replacing " so it will
still load standard json. Like every browser does and is exactly the
same philosofie as

http://docs.python.org/library/xml.dom.minidom.html

The xml.dom.minidom module is essentially a DOM 1.0-compatible DOM
with some DOM 2 features (primarily namespace features).

or

unlink() is a xml.dom.minidom-specific extension to the DOM API. After
calling unlink() on a node, the node and its descendants are
essentially useless.










More information about the Python-list mailing list