Loading ...
Sorry, an error occurred while loading the content.

Re: [json] Re: JSoda

Expand Messages
  • Tatu Saloranta
    ... Ah ok. So it s more about javascript objects, not so much about json per se? If so, it is also related to methods like Badgerfish, which likewise allows
    Message 1 of 7 , Nov 14, 2007
    • 0 Attachment
      On Nov 14, 2007 12:41 PM, Kyle Alan Hale <kylealanhale@...> wrote:
      > > I may be bit slow, but I am not sure I understand why you would want
      > > to wrap DOM within JSON?
      > > Why not deal with xml via DOM as is? And when transferring, let
      > > efficient xml generators/parsers take care of marshalling aspects?
      > >
      > > I do understand the interoperability aspects sometimes require one to
      > > use mappings to make things work (albeit inefficiently or awkwardly),
      > > but are there some other benefits?
      >
      > The DOM element objects themselves aren't being wrapped in JSON. In
      > fact, JSoda isn't JSON at all, it's just nested JavaScript objects.
      > Each object type represents a different thing:
      >
      > Object object -> DOM element
      > Array object -> DOM document fragment
      > String object -> DOM text node

      Ah ok. So it's more about javascript objects, not so much about json per se?
      If so, it is also related to methods like Badgerfish, which likewise
      allows dealing with xml data by converting it to a more palatable
      structure. :-)

      Thanks!

      -+ Tatu +-
    • Kyle Alan Hale
      ... per se? ... Yes, much like Badgerfish, just not as comprehensive.. but a bit easier to read. Badgerfish is ideal for representing any XML-based data.
      Message 2 of 7 , Nov 14, 2007
      • 0 Attachment
        > Ah ok. So it's more about javascript objects, not so much about json
        per se?
        > If so, it is also related to methods like Badgerfish, which likewise
        > allows dealing with xml data by converting it to a more palatable
        > structure. :-)
        >
        > Thanks!
        >
        > -+ Tatu +-
        >

        Yes, much like Badgerfish, just not as comprehensive.. but a bit
        easier to read. Badgerfish is ideal for representing any XML-based
        data. JSoda is a simple alternative for storing XHTML (by utilizing
        my toJSoda() function), and for quickly building DOM nodes with
        toDOM(). The format of JSoda, though, has the same aim as Badgerfish:
        JSON compatibility.
      Your message has been successfully submitted and would be delivered to recipients shortly.