Home › Forums › JavaScript › What is JSON? And should I be using it?
- This topic is empty.
-
AuthorPosts
-
April 12, 2013 at 4:18 pm #44078
superdesigngirl
MemberI 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 #131636TheDoc
MemberThe 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 #131644CrocoDillon
ParticipantI 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 #131652nordstromdesign
ParticipantJSON 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 #131653__
ParticipantJSON 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 #131661theacefes
MemberI 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 #131699superdesigngirl
MemberOooo, that would be great if you could navigate me to some examples of how it is used??
April 13, 2013 at 3:24 pm #131734theacefes
MemberWell, 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)
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.