0
0
Rest APIprogramming~5 mins

JSON as standard format in Rest API - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does JSON stand for?
JSON stands for JavaScript Object Notation. It is a lightweight format to store and exchange data.
Click to reveal answer
beginner
Why is JSON commonly used in REST APIs?
JSON is easy to read and write for humans and machines. It is language-independent and works well for data exchange between servers and clients.
Click to reveal answer
beginner
What data types can JSON represent?
JSON can represent strings, numbers, objects (key-value pairs), arrays, booleans (true/false), and null.
Click to reveal answer
beginner
How is a JSON object structured?
A JSON object is enclosed in curly braces { } and contains key-value pairs. Keys are strings, and values can be any JSON data type.
Click to reveal answer
beginner
What is a common mistake when writing JSON?
A common mistake is using single quotes instead of double quotes for keys or strings. JSON requires double quotes for all keys and string values.
Click to reveal answer
Which of these is a valid JSON data type?
AArray
BFunction
CUndefined
DSymbol
In JSON, how must keys be written?
AWith double quotes
BWith single quotes
CWithout quotes
DWith backticks
What is the main reason JSON is used in REST APIs?
AIt supports functions
BIt runs faster than XML
CIt is easy to read and exchange data
DIt is binary format
Which symbol encloses a JSON array?
A{}
B[]
C()
D<>
Which of these is NOT valid JSON?
A{"name": "Alice"}
B{"age": 30}
C{"isStudent": false}
D{name: "Bob"}
Explain why JSON is the standard format for data exchange in REST APIs.
Think about what makes data easy to share between different programs.
You got /4 concepts.
    Describe the structure of a JSON object and how it differs from a JSON array.
    Compare the symbols and content inside JSON objects and arrays.
    You got /5 concepts.