[
Lists Home |
Date Index |
Thread Index
]
- To: Michael Champion <mchampion@xegesis.org>
- Subject: Re: [xml-dev] JSON (was Re: [xml-dev] 10th anniversary of the annoucementof XML ..need help)
- From: Tahir Hashmi <tnhashmi@gmail.com>
- Date: Thu, 08 Jun 2006 14:46:46 +0530
- Cc: XML Developers List <xml-dev@lists.xml.org>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=YItKxn1oBKg/C+jZNNyNt3fkTlNImIBoBy/GtSsgrXATPBv/v9HxThTd72fQo06WLQwdzcxpSP9bu37HKYdxa1a0zCoeqohR2TYY/0NsRRi8OdJkRe0SSLGmWmvdArYXlQLVmiBFnwqwu3dp5GK8AEBVPWjxnRqQF8OZTRr25PM=
- In-reply-to: <4487B75C.6080403@xegesis.org>
- References: <20060607215749.41707.qmail@web32804.mail.mud.yahoo.com> <4487B75C.6080403@xegesis.org>
- User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.7) Gecko/20050418
On 06/08/06 11:06, Michael Champion wrote:
> down below. XML has many disadvantages, especially for object
> serialization, but those problems pale in comparison to the problems of
> not having a universal data interchange format.
Universality is tricky business, though. It's not possible to wish
something into "universal" status.
> language, has to use your data? What happens when you need to start
> supporting HTML markup of the text fields in those objects? JSON will
> hit a brick wall, and so will S-Expressions AFAIK.
Why do you think JSON will hit a brick wall? It's not tough, if not
easier, to HTMLise JSON objects because JS is available more easily
than XSLT. What I mean is that if you're using JSON, your data is
accessible to more browsers than XML (unless you apply XSLT on the
server side, which then becomes a case in favour of (X)HTML rather
than XML).
> frying pan yet avoid the non-interoperable format fire would be if XML
> 1.0 is the fallback that *everyone* supports if JSON, S-expression, or
This makes sense.
> soooo 1990's. Use an alternative where it solves a real problem and
JSON solves a real problem of object serialisation and interchange
without resorting to binary or difficult-to-read representations. APIs
exposed over HTTP need to exchange messages that contain objects more
often than they need to exchange documents and XML isn't the most
optimal way to do it.
I used to use var_dump for debug tracers in my PHP scripts but I
switched to json_encode because it prints everything in one line, yet
is much easier to read. XML? Heh, won't even dare use it for dumping
objects etc.
> doesn't create worse interop problems, but invest any excess energy
> toward improving XML, incrementally and hopefully in a
> backwards-compatible way.
Maintaining things in a backward compatible manner soon hits
limitations in terms of what can and can not be done. XML has hit the
wall where syntax is concerned. E.g. it's awfully irritating to write
<foo>...</foo> when it could've been <foo>...</> (yeah, nXML mode
helps a lot there). It's even more irritating to read that stuff when
the tag soup takes up 70% of the visible text.
--
Tahir
|