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 1 - Observer pattern - Quiz 7medium Behavioral Design Patterns — Part 1 - State pattern - Quiz 12easy Behavioral Design Patterns — Part 1 - Why behavioral patterns define object interaction - Quiz 14medium Behavioral Design Patterns — Part 1 - Iterator pattern - Quiz 11easy Behavioral Design Patterns — Part 2 - When to use which behavioral pattern - Quiz 6medium Behavioral Design Patterns — Part 2 - Null Object pattern - Quiz 8hard Behavioral Design Patterns — Part 2 - Why more behavioral patterns solve communication - Quiz 13medium Design — Elevator System - Multiple elevator coordination - Quiz 12easy Design — Library Management System - Fine calculation - Quiz 1easy Design — Tic-Tac-Toe Game - Board, Player, Game classes - Quiz 12easy