Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript What is JSON? And should I be using it?

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #44078

    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!

    #131636
    TheDoc
    Member

    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.

    #131644
    CrocoDillon
    Participant

    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.

    #131652
    nordstromdesign
    Participant

    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.

    #131653
    __
    Participant

    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.

    #131661
    theacefes
    Member

    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.

    #131699

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

    #131734
    theacefes
    Member

    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)
  • The forum ‘JavaScript’ is closed to new topics and replies.