JSON (JavaScript Object Notation) Interview Questions & Answers

  1. Question 1. Why Do We Use Json?

    Answer :

    The JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application, serving as an alternative to XML.

  2. Question 2. What Is The Difference Between Xml And Json?

    Answer :

    The fundamental difference, which no other answer seems to have mentioned, is that XML is a markup language (as it actually says in its name), whereas JSON is a way of representing objects (as also noted in its name). This is what makes markup languages so useful for representing documents.

  3. PHP and Jquery Interview Questions

  4. Question 3. Why Json Format Is Better Than Xml?

    Answer :

    JSON and XML used different formats. When compared both JSON is easy to write and use it applications then XML. The XML format can also be determined by the XML DTD or XML Schema (XSL) and can be tested.

    The JSON a data-exchange format which is getting more popular as the JavaScript applications possible format. Basically this is an object notation array. JSON has a very simple syntax so can be easily learned.

  5. Question 4. Is Json Markup Language?

    Answer :

    JSON is like XML in that it is used to structure data in a text format and is commonly used to exchange data over the Internet. JSON is not a markup language. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.

  6. PHP and Jquery Tutorial

  7. Question 5. What Is Json Text?

    Answer :

    A JSON text is a sequence of tokens formed from Unicode code points that conforms to the JSON value grammar. The set of tokens includes six structural tokens, strings, numbers, and three literal name tokens.

    The six structural tokens:

    [ U+005B left square bracket

    { U+007B left curly bracket

    ] U+005D right square bracket

    } U+007D right curly bracket

    : U+003A colon

    , U+002C comma

    These are the three literal name tokens:

    true U+0074 U+0072 U+0075 U+0065

    false U+0066 U+0061 U+006C U+0073 U+0065

    null U+006E U+0075 U+006C U+006C

    Insignificant whitespace is allowed before or after any token. Whitespace is any sequence of one or more of the following code points: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020). Whitespace is not allowed within any token, except that space is allowed in strings.

  8. Java Abstraction Interview Questions

  9. Question 6. What Is Json Value?

    Answer :

    A JSON value can be an object, array, number, string, true, false, or null.

  10. Question 7. What Is Json Syntax?

    Answer :

    JSON syntax is derived from JavaScript object notation syntax. Data is in name/value pairs. Data is separated by commas. Curly braces hold objects. Square brackets hold arrays.

  11. Javascript Objects Tutorial
    Javascript Objects Interview Questions

  12. Question 8. What Is Json Array?

    Answer :

    An array structure is a pair of square bracket tokens surrounding zero or more values. An array is an ordered collection of values. An array begins with [ (left bracket) and ends with ] (right bracket). Values are separated by , (comma). The values are separated by commas. The JSON syntax does not define any specific meaning to the ordering of the values. However, the JSON array structure is often used in situations where there is some semantics to the ordering.

  13. Question 9. What Is Number In Json?

    Answer :

    A number is very much like a C or Java number, except that the octal and hexadecimal formats are not used. A number is a sequence of decimal digits with no superfluous leading zero.

    It may have a preceding minus sign (U+002D). It may have a fractional part prefixed by a decimal point (U+002E). It may have an exponent, prefixed by e (U+0065) or E (U+0045) and optionally + (U+002B) or – (U+002D). The digits are the code points U+0030 through U+0039.

    Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted.

  14. Javascript Advanced Interview Questions

  15. Question 10. What Is Json Object?

    Answer :

    An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma).

  16. Javascript Advanced Tutorial

  17. Question 11. What Is Json Rpa Java?

    Answer :

    JSON-RPC is a simple remote procedure call protocol similar to XML-RPC although it uses the lightweight JSON format instead of XML (so it is much faster).

  18. JqueryUI Interview Questions

  19. Question 12. What Is A Json Parser?

    Answer :

    JSON parser to parse JSON object and MAINTAIN comments. By using JSON, when receiving data from a web server, the data should be always in a string format. We use JSON.parse() to parse the data and it becomes a JavaScript object.

    The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string. An optional reviver function can be provided to perform a transformation on the resulting object before it is returned.

  20. PHP and Jquery Interview Questions

  21. Question 13. Which Browser Provides Native Json Support?

    Answer :

    All modern browsers support native JSON encoding/decoding (Internet Explorer 8+, Firefox 3.1+, Safari 4+, and Chrome 3+). Basically, JSON.parse(str) will parse the JSON string in str and return an object, and JSON.stringify(obj) will return the JSON representation of the object obj.

  22. JqueryUI Tutorial

  23. Question 14. What Are The Properties Of Json?

    Answer :

    These properties make JSON an ideal data-interchange language.

    JSON is built on two structures:

    A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.

    An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

    These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures.

  24. Question 15. Is Json Is A Language?

    Answer :

    JSON is a data format. It could be classified as a language, but not a programming language. Its relationship to JavaScript is that it shares its syntax (more or less) with a subset of JavaScript literals.

  25. SQLite Interview Questions

  26. Question 16. What Programming Languages Supported By Json?

    Answer :

    JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.

  27. JSON (JavaScript Object Notation) Tutorial

  28. Question 17. Json Name/value Pair Is Written As?

    Answer :

    JSON name/value pair is written as “name” : “value”

  29. RESTful JAVA Web Services Interview Questions

  30. Question 18. Does Whitespace Matter In Json?

    Answer :

    Yes, only within strings.

  31. Java Abstraction Interview Questions

  32. Question 19. Can You Use A Double Quote Inside A Json String?

    Answer :

    Yes, if it is escaped like ( ” )

  33. Question 20. In Modern Websites What Is The Common Usage For Json?

    Answer :

    To send and receive bits of data.

  34. jQuery Mobile Interview Questions

  35. Question 21. What Does Json Stand For?

    Answer :

    JavaScript Object Notation.

  36. Question 22. Which Is Proper A Json Array?

    Answer :

    { “letters” : [ “a”, “b”, “c” ] }

  37. Question 23. Which Is A Benefit Json Has Over Xml?

    Answer :

    JSON has less markup requirements and therefore is lighter than XML.

  38. Advanced jQuery Interview Questions

  39. Question 24. What Kind Of Format Is Json, And What Does The Acronym Mean?

    Answer :

    A lightweight data-interchange format. JavaScript Object Notation.

  40. Javascript Objects Interview Questions

  41. Question 25. Which Is A Valid Json String?

    Answer :


    “meals” : [ “breakfast” , “lunch” , “dinner” ]


  42. Question 26. Which Code Will Return A Valid Json Object?

    Answer :

    JSON.parse(‘{“FirstName”: “John”, “LastName”:”Doe”}’);

  43. Question 27. Which Is True About Json Namespace?

    Answer :

    JSON doesn’t have namespaces. Through every object is inherently a namespace.

  44. Javascript Advanced Interview Questions