On Thu, Sep 25, 2008 at 5:43 PM, Hugh Sasse <[EMAIL PROTECTED]> wrote: > On Fri, 26 Sep 2008, Bluebie, Jenna wrote: > >> Times when xml is appropriate? How painful. Just use JSON if you need > > "Spare him his life from this verbosity!" to misquote [Mercury, et al] :-) > But sometimes you have to talk to systems that use XML, work with people > who do, etc. So it's useful to know about, although last time I tried > to understand XSLT and its minders, the experience wasn't exactly pleasant.
fwiw, I advocate JSON, as well. Seems to me that in most cases, it covers all the bases people generally use XML for with a much simpler markup. Tho, if you have code libraries handling all the generation and parsing and manipulation and what not, what difference does it really make? Probably little unless you have to get down to measuring microseconds for doing all these things. I dunno. Anyhoo.. If one had to move things back and forth between XML world but have some interest in using JSON, or vice versa, one might find some usefulness in ActiveSupport's :to_xml and :to_json. Perhaps one might steal the idea if not simply use the library. It appears :to_json is mostly defined in one spot while :to_xml stuff is split up amongst core extensions for various classes. http://github.com/rails/rails/tree/master/activesupport -- Seth Thomas Rasmussen http://greatseth.com
