Bird
0
0

You want to include a response timestamp in your envelope. Which JSON structure correctly adds a timestamp field with ISO 8601 format?

hard📝 Application Q8 of 15
Rest API - Request and Response Format
You want to include a response timestamp in your envelope. Which JSON structure correctly adds a timestamp field with ISO 8601 format?
A{"status": "success", "timestamp": null, "data": {}}
B{"status": "success", "timestamp": 1654080000, "data": {}}
C{"status": "success", "time": "2024/06/01 12:00:00", "data": {}}
D{"status": "success", "timestamp": "2024-06-01T12:00:00Z", "data": {}}
Step-by-Step Solution
Solution:
  1. Step 1: Understand ISO 8601 format

    It uses the format YYYY-MM-DDTHH:mm:ssZ.
  2. Step 2: Evaluate options

    {"status": "success", "timestamp": "2024-06-01T12:00:00Z", "data": {}} uses correct ISO 8601 string; others use epoch, wrong key, or null.
  3. Final Answer:

    {"status": "success", "timestamp": "2024-06-01T12:00:00Z", "data": {}} -> Option D
  4. Quick Check:

    ISO 8601 timestamp string required [OK]
Quick Trick: Use ISO 8601 string for timestamps [OK]
Common Mistakes:
  • Using epoch integers instead of ISO strings
  • Incorrect timestamp key name
  • Setting timestamp to null

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes