Bird
0
0

Identify the error in this event schema:

medium📝 Analysis Q14 of 15
Microservices - Event-Driven Architecture
Identify the error in this event schema:
{"eventType": "PaymentProcessed", "timestamp": "2024-06-01T15:00:00Z", "data": {"amount": 100, "currency": USD}}
AMissing comma after amount key
BMissing quotes around the currency value USD
Ctimestamp format is incorrect
DeventType should be lowercase
Step-by-Step Solution
Solution:
  1. Step 1: Check JSON value types

    String values must be in double quotes; USD is unquoted here.
  2. Step 2: Verify other parts

    Comma after amount is present, timestamp format is ISO standard, eventType case is allowed.
  3. Final Answer:

    Missing quotes around the currency value USD -> Option B
  4. Quick Check:

    Strings need quotes [OK]
Quick Trick: String values must have quotes in JSON [OK]
Common Mistakes:
MISTAKES
  • Ignoring missing quotes on string values
  • Thinking timestamp format is wrong
  • Assuming key case matters in JSON

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes