I think you make JSON's point for it. It has a single, unambiguous, bidirectional mapping to native data structures in all dynamic languages; indeed that is its design goal.
XML does not map well to language structures, except in languages designed explicitly to manipulate it. The duality of elements and attributes means additional choices at each encode/decode boundary, and guaranteed ambiguity. To continue the argument made by mark Nottingham and Tim Bray, having to choose between attributes and elements at each point imposes the same overhead at a different layer than having to choose between xml and json. Yes, this natural mapping does not hold true for C, because C doesn't have a native dictionary/hashtag data structure. C doesn't make XML or anything else easy either, but C programmers are used to that. On Mon, Apr 23, 2012 at 10:56 PM, Paul E. Jones <pau...@packetizer.com>wrote: > Michael, > > > From a programming standpoint, JSON is just easier to deal with. > Consider > > these two links: > > > > http://php.net/manual/en/book.json.php > > > > http://php.net/manual/en/book.xml.php > > > > and tell me which you'd rather deal with. It's not huge, but it's not > > nothing either. > > To be fair, this works well partly because of the language. Works even > better in JavaScript. It would work less well in C. Here's just one > example: > http://www.digip.org/jansson/doc/2.3/ > > JSON bits do not map perfectly to C. I thought C++ might be simpler, but > the first library I grabbed had library documentation that was 224 pages > long (libjson). > > When I process simple XML like that from WebFinger, I tend to use a parser > that just steps through each node in order. I don't need to decode the > whole "document" in memory and reference pieces and parts of it: one pass > over it and I grab what I need. It's very simple to process the XML output > from WebFinger that way. > > Paul > > > _______________________________________________ > OAuth mailing list > OAuth@ietf.org > https://www.ietf.org/mailman/listinfo/oauth >
_______________________________________________ OAuth mailing list OAuth@ietf.org https://www.ietf.org/mailman/listinfo/oauth