JSON

  Home  World Wide Web  JSON


“JSON frequently Asked Questions by expert members with experience in JSON. These interview questions and answers on JSON will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. So get preparation for the JSON job interview”



12 JSON Questions And Answers

2⟩ What is JSON?

JSON stands for JavaScript Object Notation, JSON is lightweight text-data interchange format it is language independent mean JSON uses JavaScript syntax for describing data objects, but JSON is still language and platform independent. JSON parsers and JSON libraries exists for many different programming languages. It is "self-describing" and easy to understand.

 176 views

3⟩ What is JSON Parser?

The eval() function can compile and execute any JavaScript. This represents a potential security problem.

It is safer to use a JSON parser to convert a JSON text to a JavaScript object. A JSON parser will recognize only JSON text and will not compile scripts.

 167 views

4⟩ Which browsers provide native JSON support?

Native JSON support is included in newer browsers and in the newest ECMAScript (JavaScript) standard.

Web Browsers Support:

► Firefox (Mozilla) 3.5

► Internet Explorer 8

► Chrome

► Opera 10

► Safari 4

 177 views

5⟩ Explain Syntax of JSON?

JSON is smaller than XML, and faster and easier to parse. Below is a basic syntax of JSON

JSON CODE

{

"studeents": [

{ "firstName":"Ali" , "lastName":"Khan" },

{ "firstName":"John" , "lastName":"Sena" },

{ "firstName":"Kate" , "lastName":"Winslet" }

]

}

 170 views

6⟩ Explain JSON Syntax Rules?

JSON syntax is a subset of the JavaScript object notation syntax.

► Data is in name/value pairs

► Data is separated by comma

► Curly brackets holds objects

► Square brackets holds arrays

 162 views

7⟩ Explain JSON Values?

JSON values can be:

► A number (integer or floating point)

► A string (in double quotes)

► A Boolean (true or false)

► An array (in square brackets)

► An object (in curly brackets)

► null

 166 views

8⟩ Explain JSON Arrays?

JSON arrays are written inside square brackets.

An array can contain multiple objects:

JSON Arrays

{

"studeents": [

{ "firstName":"Ali" , "lastName":"Khan" },

{ "firstName":"John" , "lastName":"Sena" },

{ "firstName":"Kate" , "lastName":"Winslet" }

]

}

 166 views

9⟩ Explain Syntax of JSON using JavaScript?

Because JSON uses JavaScript syntax, no extra software is needed to work with JSON within JavaScript.

With JavaScript you can create an array of objects and assign data to it like this:

JSON CODE

{

"studeents": [

{ "firstName":"Ali" , "lastName":"Khan" },

{ "firstName":"John" , "lastName":"Sena" },

{ "firstName":"Kate" , "lastName":"Winslet" }

]

}

 161 views

11⟩ Explain JSON Objects?

JSON objects are written inside curly brackets,

Objects can contain multiple name/values pairs.

 218 views