Getting started with JSON

Oct 24, 2008 insic 4 Comments

In a past few weeks, most of my projects handled involved XML manipulation and AJAX. And because of that I found an alternative to the XML which is more lightweight and can be easily used together with your DOM. Its JSON.

JSON is a data exchange format that is a subset of the object literal notation in JavaScript. It has been gaining a lot of attention lately as a lightweight alternative to XML, especially in Ajax applications. Why is this? Because of the ability in JavaScript to parse information quickly using the eval( ) function. JSON does not require JavaScript, however, and you can use it as a simple exchange format for any scripting language.

Lets take a look what JSON looks like.

This is the equivalent in XML:

JSON is more elegant in describing your data because of its simplicity and more lightweight.

In the next post about JSON I will be covering JSON Requests and Responses and give some examples on handling it using Zend Framework JSON library.

About the author: insic

Subscribe in my RSS Feed for more updates on Web Design and Development related articles. Follow me on twitter or drop a message to my inbox.

  • Infaas

    Hi, I am a VFX artist, I am interested in you stuff, I seriously don’t know what JSON means(it looks like a coding language),sorry but is web development a daunting task? what does it take to be a web developer,
    c ya

  • http://blog.insicdesigns.com insic2.0

    Infaas, Thanks for dropping by. All your questions can be answered if you ask me how to become a VFX artist. I dont even know what VFX means. Cheers!

  • http://www.topcoder.com/tc?module=MemberProfile&cr=22730516 andresmtz

    Hi insic,

    I agree with you, JSON is more simple and lightweight. I’m a web developer and I’m learning some stuff about jquery and web 2.0.
    I will start learning how to process JSON using your tutorials, which are very good.

    PS: you look cute in your photo.

  • http://janckos.net Janckos

    Buen post para iniciar con JSON.