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

XML or JSON

Expand Messages
  • mertsakarya@hotmail.com
    - A Sunday thought; I was planning to tattoo XML on my left shoulder. After I ve discovered JSON , all my data transfer formats became JSON instead of XML.
    Message 1 of 3 , Mar 18, 2007
    View Source
    • 0 Attachment
      - A Sunday thought;

      I was planning to tattoo "XML" on my left shoulder.

      After I've discovered "JSON", all my data transfer formats became JSON instead of XML. I'm confused, if I should tattoo JSON.
      Which one's going to be there in the long term?

      I know JSON is a data exchange format which makes it perfect for Web and XML is a document format.

      Which one would you tattoo on your shoulder?
      My mind says, I should stick with XML, but I can't ignore JSON.

      Are we gonna use JSON or XML in the next twenty years?

      Mert

      [Non-text portions of this message have been removed]
    • Kevin Prichard
      Message 2 of 3 , Mar 18, 2007
      View Source
      • 0 Attachment
        On 3/18/07, mertsakarya@... <mertsakarya@...> wrote:
        >
        >
        >
        >
        >
        >
        > - A Sunday thought;
        >
        > I was planning to tattoo "XML" on my left shoulder.
        >
        > After I've discovered "JSON", all my data transfer formats became JSON
        > instead of XML. I'm confused, if I should tattoo JSON.
        > Which one's going to be there in the long term?
        >
        > I know JSON is a data exchange format which makes it perfect for Web and
        > XML is a document format.
        >
        > Which one would you tattoo on your shoulder?
        > My mind says, I should stick with XML, but I can't ignore JSON.
        >
        > Are we gonna use JSON or XML in the next twenty years?
        >
        > Mert
        >
        > [Non-text portions of this message have been removed]
        >
        >
      • Kevin Prichard
        ... While XML and JSON are similar, JSON s biggest win is simplicity: it s a convenient, well-supported serialization format that s great for representing
        Message 3 of 3 , Mar 18, 2007
        View Source
        • 0 Attachment
          > Which one's going to be there in the long term?

          While XML and JSON are similar, JSON's biggest win is simplicity: it's
          a convenient, well-supported serialization format that's great for
          representing loosely-typed string/numeric values with two common data
          structures found in most languages: hashes and arrays. Plus
          converting to/from JSON from/to native representation on many
          languages can happen in a single step, usually (after the library's
          loaded.)

          XML has got a number years of maturity over JSON. Widely-available
          features XML has that JSON hasn't (or much of): DTDs, schemas,
          validation, node attributes, and CDATA blocks, for starters.
          Validation for JSON has come a long way in a short time, but it is far
          from universal. Validating data is usually up you, the developer, to
          handle in the language you're converting JSON to/from. The most you
          can expect of any given JSON decoder is to tell you the JSON was
          well-formed (i.e. whether or not it was unserialized, but not always
          why it wasn't), and depending on the support for your language, you
          might find a library that does schema-style validation. The one thing
          I worry about with JSON is vulnerabilities.

          So maybe it is not for all purposes ... I'm guessing that people who
          want the additional sophistication of XML will keep going with XML, at
          least until JSON catches up. As storage gets denser, bandwidth gets
          faster, XML's higher calorie rating won't mean so much in future
          years. And not everybody wants to validate the data they receive, I
          guess, so there's a place for both. I'm thinking of data services
          that want to provide data via light-weight, REST-y interfaces.

          -kevin

          Kevin Prichard
          New York Times Digital
          Lead Developer, MyTimes

          On 3/18/07, mertsakarya@... <mertsakarya@...> wrote:
          >
          >
          >
          >
          >
          >
          > - A Sunday thought;
          >
          > I was planning to tattoo "XML" on my left shoulder.
          >
          > After I've discovered "JSON", all my data transfer formats became JSON
          > instead of XML. I'm confused, if I should tattoo JSON.
          > Which one's going to be there in the long term?
          >
          > I know JSON is a data exchange format which makes it perfect for Web and
          > XML is a document format.
          >
          > Which one would you tattoo on your shoulder?
          > My mind says, I should stick with XML, but I can't ignore JSON.
          >
          > Are we gonna use JSON or XML in the next twenty years?
          >
          > Mert
          >
          > [Non-text portions of this message have been removed]
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.