JSON Interview Questions: Key Concepts and Answers
JSON, or JavaScript Object Notation, is a lightweight, text-based data format used to exchange structured data between frontend and backend systems in web applications, and it is a critical topic for developer interviews. The format uses key-value pairs and supports strings, numbers, booleans, arrays, objects, and null. Key operations include converting between JSON strings and JavaScript objects using `JSON.parse()` and `JSON.stringify()`. JSON does not support functions, undefined values, or duplicate keys, and it can be transmitted securely over HTTPS. Created by Douglas Crockford in 2000, JSON is language-independent and supported by all modern browsers. It is often compared to XML, with JSON being simpler and lighter, though XML is considered more secure. Alternatives to JSON include XML, YAML, and Protocol Buffers.