JSON Data Types β Interview Questions
β‘ Short Answer
JSON supports six value types: string (double-quoted), number, boolean (true/false), null, object ({}), and array ([]). It has no date, integer-vs-float distinction, undefined, function, or comment types β dates are usually sent as ISO-8601 strings and big/precise numbers as strings.
βCoffee Chat Question
Concept Made Simple
βWhat data types does JSON support?β
π§ Mind Map Answer
Remember It Faster
β¨οΈHands-on Keyboard
Learn by Doing
{
"name": "Guru",
"age": 30,
"verified": true,
"manager": null,
"skills": ["Java", "AWS"],
"joined": "2026-08-01T09:00:00Z"
}π₯What If?
Think Beyond the Expected
How do you represent a date, since JSON has no date type?
Use a string, almost always ISO-8601 ("2026-08-01T09:00:00Z"), and parse it on each side (new Date(str) in JS, java.time.Instant in Java). Some teams send a Unix epoch number instead. There's no native date, so both parties must agree on the string/number convention.
πReal World
The 'JSON has no date' fact bites everyone eventually β you JSON.stringify a Date and it becomes an ISO string, then forget to parse it back and end up comparing a string to a Date. Money and IDs are often sent as strings to avoid float precision loss.
π―Interviewer's Expectation
Keywords they're listening for:
β οΈCommon Mistakes
- βExpecting a native date type
- βUsing single quotes for strings
- βAssuming numbers keep exact precision (float issues)
β Best Practices
- βSend dates as ISO-8601 strings
- βSend money/large IDs as strings to avoid float errors
- βDistinguish null (known-empty) from a missing key
πFollow-up Questions
- 1Why send large numbers or money as strings?
- 2How is null different from an absent key?
- 3What happens to undefined during JSON.stringify?
π§©Related Technologies
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: Syntax (JSON) Interview question: "What data types does JSON support?" 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?
β Featured Products
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.