Grow your CSS skills. Land your dream job.

What is JSON? And should I be using it?

  • # April 12, 2013 at 4:18 pm

    I know that JSON is a data interchange format like XML but should I know about this technology? I had a recruiter call me saying they have a company looking for a JS Developer with experience with JSON. I’ve been programming with js for almost 15 years and I’ve never come across it. Am I missing something? Thanks!

    # April 12, 2013 at 4:36 pm

    The only real experience I have with JSON is when making AJAX calls to a third party API like Twitter or Instagram (or pretty much any other API). The data that gets returned is usually in JSON format, which makes it easy to traverse and find specific values.

    # April 12, 2013 at 5:26 pm

    I also have limited experience with JSON but it doesn’t seem like you need tons of experience to be able to use it, it’s just a data format and easy to use. Correct me if I’m wrong.

    # April 12, 2013 at 5:46 pm

    JSON stands for JavaScript Object Notation and is one of the more efficient ways the information you are retrieving from a server can be sent to the local machine to be parsed and processed by JavaScript. It is usually used in cooperation with AJAX as @TheDoc has said. If you perform a lot of information retrieval from a server script or database, this is definitely something you should be utilizing.

    __
    # April 12, 2013 at 5:51 pm

    JSON is just a text serialization of javascript object literals. They can contain only data, however (key:value pairs; not functions). Observe:

    // javascript object literal
    { key1: ‘some value’ , key2: true }

    // JSON representation of above
    “{ “key1″:”some value” , “key2″:”true” }”

    If you know JS, JSON will be trivial to pick up. In native JS implementations, keys and booleans/numbers don’t need to be quoted; but if you’re transporting back-and-forth with other languages (which is what JSON is designed for), it’s a good habit.

    When an employer asks for “experience with JSON,” they probably use it as an exchange format. It’s likely that what they really want is someone who can figure out what information is needed for given tasks, and design efficient data structures to pass the info back and forth to each end of the application.

    # April 12, 2013 at 9:47 pm

    I used JSON to pass data when I was checking the number of active users in a db for a community. The data would then be used to populate a counter control that did a cute animation whenever we got new signups.

    Just an example but yeah it’s handy and easy to pick up.

    # April 13, 2013 at 7:37 am

    Oooo, that would be great if you could navigate me to some examples of how it is used??

    # April 13, 2013 at 3:24 pm

    Well, there is [this](http://www.jsonexample.com/ “This”)

    Most of the json I’ve used has been in combination with ajax calls to controller actions. (MVC3 framework)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".