EasyπŸ‘€ 0-2 yearsπŸ‘€ 3-5 years 1 min read

What is JSON? Interview Questions

Asked inInfosysTCSAccentureCognizant
#json#javascript object notation#data format#basics#data interchange
Report issue

⚑ Short Answer

JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent format for storing and exchanging data as key/value pairs and ordered lists. It grew out of JavaScript object syntax but is now used by nearly every language and is the default payload format for REST APIs.

β˜•Coffee Chat Question

Concept Made Simple

β€œWhat is JSON?”

🧠Mind Map Answer

Remember It Faster

JSON is just text that describes data in a shape almost every language understands. Machines exchange it; humans can read it.

Stands for→JavaScript Object Notation
Form→Text — objects `{}` and arrays `[]`
Used for→APIs, config, logs, messaging
Language→Independent (not just JavaScript)

⌨️Hands-on Keyboard

Learn by Doing

json
{
  "name": "Guru",
  "age": 30,
  "isEngineer": true,
  "skills": ["Java", "AWS"],
  "address": { "city": "Chennai" }
}

πŸ”₯What If?

Think Beyond the Expected

Is JSON the same thing as a JavaScript object?

No. JSON is a text FORMAT inspired by JavaScript object literals, but it's stricter β€” keys must be double-quoted strings, no comments, no trailing commas, no functions or dates. A JavaScript object lives in memory; JSON is a string you parse into (or serialize from) such objects.

πŸ˜‚Real World

Almost every API response you've ever seen is JSON β€” the frontend fetches it, parses it, and renders the UI. It's also everywhere in config files (package.json, tsconfig.json), log lines, and message queues.

🎯Interviewer's Expectation

Keywords they're listening for:

βœ“ text-based data formatβœ“ key/value + arraysβœ“ language-independentβœ“ default for REST APIsβœ“ human-readable

⚠️Common Mistakes

  • βœ—Calling JSON a programming language
  • βœ—Assuming it's JavaScript-only
  • βœ—Confusing the in-memory object with the JSON string

βœ…Best Practices

  • βœ“Use JSON for interchange, not as an in-memory type
  • βœ“Keep keys consistent (camelCase or snake_case)
  • βœ“Validate JSON at trust boundaries

πŸ”Follow-up Questions

  • 1How is JSON different from a JavaScript object?
  • 2What data types does JSON support?
  • 3Why did JSON become more popular than XML?

🧩Related Technologies

RESTJavaScriptYAMLXML

Continue Learning with AI

Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly β€” AI is your learning companion, not a shortcut.

Plain-language foundations

I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner.

Topic: Basics (JSON)
Interview question: "What is JSON?"

Please:
1. Explain the core idea in simple, plain language, using an everyday analogy.
2. Define any technical terms you use.
3. Walk through one small, concrete example.
4. Finish with a single sentence I can easily remember.

Keep the tone friendly and assume I'm new to this topic.

Was this answer helpful?

Support our platform by exploring our recommended products.

As an Amazon affiliate, purchases through these links may earn us a small commission β€” at no extra cost to you. It helps keep Full Stack Interview Guru free.

Related Questions