🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Testing Spring Boot: all 10 questions

Quiz: Testing Spring Boot · Question 9 of 10

What does JsonCompareMode.STRICT add to a JSON comparison?

What does JsonCompareMode.STRICT add to a JSON comparison?

  1. A.It ignores field order and extra fields
  2. B.It fails on any extra or missing field
  3. C.It compares only the status code
  4. D.It formats the JSON
Answer & explanation

Correct answer: It fails on any extra or missing field

Strict mode catches accidental new fields leaking into the response.

Can you get the rest right without peeking?

Take the timed Quiz: Testing Spring Boot quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →