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

Re: [json] Digest Number 597

Expand Messages
  • Mark Joseph
    Thanks Alan, I believe I do reference that mapping but in a different URL, namely: http://onwebdevelopment.blogspot.com/2008/05/converting-xml-to-json.html it
    Message 1 of 3 , Apr 6 8:58 AM
    • 0 Attachment
      Thanks Alan,

      I believe I do reference that mapping but in a different URL, namely:

      http://onwebdevelopment.blogspot.com/2008/05/converting-xml-to-json.html

      it is in section 3.2 the second link of my document. I have commented on it in that section.


      Thanks,

      Mark Joseph, Ph.D.
      President
      P6R, Inc
      408-205-0361
      mark@...
      Skype: markjoseph_sc
      _____

      From: Alan Kennedy [mailto:alan@...]
      To: json@yahoogroups.com
      Sent: Tue, 06 Apr 2010 05:05:45 -0700
      Subject: Re: [json] Digest Number 597






      [Mark]
      > For people interested in this topic. We are always open to comments and questions.
      >
      > https://www.p6r.com/articles/2010/04/05/xml-to-json-and-back/

      Hi Mark.

      Nice work.

      On reading your article, I saw reference to several existing methods
      for mapping XML<->JSON. But I didn't see any reference to the Google
      XML<->JSON mapping, as described in this article.

      Using JSON in the Google Data Protocol
      http://code.google.com/apis/gdata/docs/json.html

      Looking at the examples you give about mixed-content elements, I can
      see that Google have punted on this issue, i.e. they represent

      <content type="text">Google is sponsoring at
      <a href="http://www.pubcon.com/">WebmasterWorld PubCon 2006</a>. Come and
      visit us at the booth or join us for an evening demo reception where we
      will be talking "5 ways to enhance your website with Google Code".
      After all, it is Vegas, baby! See you soon.</content>

      as

      "content": {
      "type": "text",
      "$t": "Google is sponsoring at
      <a href="http://www.pubcon.com/">WebmasterWorld PubCon 2006</a>.
      \nCome and visit us at the booth or join us for an evening demo
      reception where we will be talking "5 ways to enhance your website
      with Google Code".\nAfter all,\nit is Vegas, baby! See you soon."
      },

      In this case, the inline <a/> element is left in XML format, and not
      translated to JSON.

      Do you have any comments on the Google mapping?

      Regards,

      Alan.



      [Non-text portions of this message have been removed]
    • John Cowan
      ... Note that Google has announced a different, non-round-tripping, JSON syntax called JSONC for two of its Google Data APIs, YouTube and PicasaWeb. JSONC is
      Message 2 of 3 , Apr 6 11:14 AM
      • 0 Attachment
        Alan Kennedy scripsit:

        > On reading your article, I saw reference to several existing methods
        > for mapping XML<->JSON. But I didn't see any reference to the Google
        > XML<->JSON mapping, as described in this article.
        >
        > Using JSON in the Google Data Protocol
        > http://code.google.com/apis/gdata/docs/json.html

        Note that Google has announced a different, non-round-tripping,
        JSON syntax called JSONC for two of its Google Data APIs, YouTube and
        PicasaWeb. JSONC is not a general conversion strategy, but a per-API
        one that is designed to make the service more accessible to people who
        prefer consuming APIs with JSON. There is an experimental Java client
        which uses per-service descriptions to consume JSON appropriately.

        > Looking at the examples you give about mixed-content elements, I can
        > see that Google have punted on this issue, i.e. they represent
        >
        > <content type="text">Google is sponsoring at
        > <a href="http://www.pubcon.com/">WebmasterWorld PubCon 2006</a>. Come and
        > visit us at the booth or join us for an evening demo reception where we
        > will be talking "5 ways to enhance your website with Google Code".
        > After all, it is Vegas, baby! See you soon.</content>

        In this case, the Atom content type is "text", which means that although
        this appears to be HTML, it is treated as plain text by the API.
        Any further interpretation is up to the client.

        > In this case, the inline <a/> element is left in XML format, and not
        > translated to JSON.

        That's because it's not seen as an element at all.

        Disclaimer: Although I work for Google (and in fact belong to the
        Google Data APIs team), I am not telling you anything that isn't public
        knowledge. Any forward-looking conclusions you draw are entirely up
        to you.

        --
        At the end of the Metatarsal Age, the dinosaurs John Cowan
        abruptly vanished. The theory that a single cowan@...
        catastrophic event may have been responsible http://www.ccil.org/~cowan
        has been strengthened by the recent discovery of
        a worldwide layer of whipped cream marking the
        Creosote-Tutelary boundary. --Science Made Stupid
      Your message has been successfully submitted and would be delivered to recipients shortly.