LLD - Design — Parking Lot SystemWhich of the following is the correct JSON structure to represent a payment request with amount and currency?A{ amount = 100, currency = 'USD' }B{ 'amount': 100, 'currency': 'USD' }C{ amount: 100, currency: USD }D{ \"amount\": 100, \"currency\": \"USD\" }Check Answer
Step-by-Step SolutionSolution:Step 1: Recall JSON syntax rulesJSON keys and string values must be double-quoted. Numbers do not need quotes.Step 2: Check each option{ \"amount\": 100, \"currency\": \"USD\" } uses double quotes correctly. { 'amount': 100, 'currency': 'USD' } uses single quotes (invalid JSON). { amount: 100, currency: USD } lacks quotes around keys and string value. { amount = 100, currency = 'USD' } uses equals sign instead of colon.Final Answer:{ "amount": 100, "currency": "USD" } -> Option DQuick Check:Valid JSON = Double quotes for keys and strings [OK]Quick Trick: JSON keys and strings need double quotes [OK]Common Mistakes:MISTAKESUsing single quotes instead of double quotesOmitting quotes around string valuesUsing equals sign instead of colon
Master "Design — Parking Lot System" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Behavioral Design Patterns — Part 2 - Interpreter pattern - Quiz 13medium Behavioral Design Patterns — Part 2 - Why more behavioral patterns solve communication - Quiz 5medium Behavioral Design Patterns — Part 2 - Visitor pattern - Quiz 9hard Behavioral Design Patterns — Part 2 - When to use which behavioral pattern - Quiz 10hard Design — Elevator System - State management (idle, moving up, moving down) - Quiz 10hard Design — Library Management System - Why library management tests CRUD design - Quiz 12easy Design — Library Management System - Why library management tests CRUD design - Quiz 5medium Design — Parking Lot System - Parking strategy pattern - Quiz 14medium Design — Tic-Tac-Toe Game - Requirements and game rules - Quiz 9hard Design — Tic-Tac-Toe Game - Extensibility (NxN board, multiple players) - Quiz 3easy