0

I want to use java json schema validator to validate json

How to define json schema to prevent the repeat of firstName property ? {"firstname":"user01", "firstname":"user01", "lastname":"usertest"}

Which java framework support the repeat occurrence validation?

thank you.

Eric
  • 13
  • 4
  • Something like this? https://stackoverflow.com/questions/43803829/make-the-jackson-fail-on-duplicate-property-in-a-json – Iske Jun 04 '21 at 06:28
  • Tq for the reply. I mean to use the json schema validator, not the jackson objectmapper. How to define the constraint, for example, (1) the property can have only one occurrence (2) the property can have minimum 1 occurrence and maximum 3 occurrence. – Eric Jun 04 '21 at 14:04

0 Answers0