Back to blog Backend Interview

50 JSON interview questions

3 min readBackend Interview

Basic JSON Interview Questions

  1. What does JSON stand for?
  2. What is JSON and why is it used?
  3. What are the data types supported in JSON?
  4. Name the MIME type of JSON.
  5. What is the file extension used for JSON files?
  6. Who invented JSON?
  7. Explain the syntax rules of JSON.
  8. How is a JSON object structured?
  9. How is a JSON array structured?
  10. What is the difference between JSON and XML?

JSON Parsing & Serialization

  1. How do you parse a JSON string in JavaScript?
  2. How would you convert a JavaScript object to a JSON string?
  3. What is JSON.parse() used for?
  4. What is JSON.stringify() used for?
  5. How do you handle JSON parse errors?
  6. Explain JSON encoding and decoding.
  7. How is JSON handled in languages like Python?
  8. How do you validate JSON syntax?
  9. What libraries are commonly used for parsing JSON?
  10. Explain how JSON is transmitted between frontend and backend.

Intermediate JSON Questions

  1. What are the advantages of JSON over XML?
  2. Can JSON contain comments? Why or why not?
  3. What is the difference between JSON and BSON?
  4. Explain nested objects in JSON.
  5. How do you access values in nested JSON?
  6. How do you merge two JSON objects in JavaScript?
  7. Explain JSON schema and its use cases.
  8. What is JSONP? How is it different from JSON?
  9. How do you work with JSON fields that may be missing?
  10. Explain the difference between null and missing keys in JSON.

Advanced & Coding Questions

  1. Write a function to recursively print all keys in a nested JSON.
  2. How would you design a JSON parser from scratch?
  3. Write code to convert JSON data to a Java object (e.g., using Jackson/Gson).
  4. How do you serialize a list/array of objects into JSON?
  5. How would you handle large JSON data for performance?
  6. Explain how JSON streaming/parsing works for big files.
  7. How do you handle encoding issues in JSON (e.g., Unicode)?
  8. Write a snippet to pretty-print JSON output.
  9. How do you remove a key from a JSON object?
  10. How would you flatten a deeply nested JSON?

JSON in API & Real-World Usage

  1. How is JSON used in REST APIs?
  2. What is the correct Content-Type header for JSON in HTTP?
  3. How do you handle JSON error responses in API integration?
  4. What are common JSON security issues (e.g., injection)?
  5. Explain how JSON works with frontend frameworks (React/Angular).
  6. Describe JSON’s role in AJAX/Fetch API.
  7. How do you compress JSON for network transmission?
  8. Explain the limitations of JSON.
  9. What is the order of keys in JSON objects?
  10. When would you NOT use JSON? Explain scenarios.

InterviewExpert.org

Writing about interviews, stacks, and getting hired.

Leave a comment