Json - Interview Questions and Answers for 'Json' - 11 question(s) found - Order By Newest Q1. What are the benefits of JSON over XML ? Json
Ans. Lighter and faster than XML as on-the-wire data format
Object Representation - Information is presented in object notations and hence better understandable.
Easy to parse and conversion to objects for information consumption.
Support multiple data types - JSON supports string, number, array, boolean whereas XML data are all string. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json   markup language Asked in 1 Companies intermediate   frequent Try 1 Question(s) Test Q2. What is JSON ? Json
Ans. JSON is "JavaScript Object Notation", primarily used for client-server or server-server communication. Its a much lighter and readable alternative to XML. JSON is language independent and is easily parse-able in all programming languages. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json   markup language   client server communication Asked in 26 Companies basic   frequent Try 2 Question(s) Test Q3. What is the role of JSON.stringify ? Json
Ans. JSON.stringify() turns an object into a JSON text and stores that JSON text in a string.
So If we stringfy above notation , it will become
{"name":"xyz","gender":"male";"age":30} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json   JSON.stringify intermediate   rare Q4. Which function is used to convert a JSON text into an object ? Json
Ans. eval Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json   markup language Q5. Which data types are supported by JSON ? Json
Ans. Number String Boolean Array Object null Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json   markup language   client server communication Q6. Which markup languages can be used in restful web services ? Rest
Ans. XML and JSON ( Javascript Object Notation ). Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   web services   rest   java   j2ee   xml   json   architecture basic   frequent Q7. If we have to specify a collection of a particular information like List of addresses, How can we represent that in a JSON ? JSON
This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json Q8. Can you explain JSON specification ? JSON
This question was recently asked at 'One Click Retail'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q9. Can comments be added in JSON ? JSON
Ans. No, It should all be data. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Markup languages Q10. How to parse nested json object ? JSON
Ans. JSONObject jsonChildObject = (JSONObject)jsonObject.get("LanguageLevels");
for (Map.Entry in jsonChildOBject.entrySet()) {
System.out.println("Key = " entry.getKey() ", Value = " entry.getValue());
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json  nested json Asked in 1 Companies Q11. Why would you use XML over JSON when using ajax ? JSON
This question was recently asked at 'SoftLayer'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  xml  ajax  json Asked in 1 Companies Q12. Which of the following is not an advantage of JSON over XML ? Reference JSON
a. Lighter and Faster b. Object Representation c. Supports multiple data types d. Backward compatible with all XML applicationsAns.d. Backward compatible with all XML applications
Q13. JSON is a .. JSON
a. Programming Language b. Markup Language c. Scripting Language d. Database LanguageAns.b. Markup Language