If you take a look at JSON schema site, there are only two libraries for validation in Java.
- The one that Jorge Campos suggested is mature, but looking for new maintainer: https://github.com/fge/json-schema-validator
- Second one is relatively new: http://github.com/everit-org/json-schema
I was recently in situation where I had to choose one or the other and I picked first option. It is being used also by Rest Assured library under the hood.
Answer from luboskrnac on Stack OverflowMedium
medium.com โบ @mohommad.belal โบ json-schema-validator-using-java-springboot-667ed42480d5
JSON Schema Validator using Java SpringBoot. | Medium
May 11, 2024 - Please note, that you can select any version of spring-boot and java as well as project type. We will use the networknt:json-schema-validator library.
MS Charhag
mscharhag.com โบ spring โบ json-schema-validation-handlermethodargumentresolver
Integrating JSON Schema validation in Spring using a custom HandlerMethodArgumentResolver
We learned how to integrate JSON Schema validation into a Spring Boot application by implementing a custom HandlerMethodArgumentResolver. Within our implementation we validate the JSON request body against a JSON Schema before it is passed as argument to the controller.
How to validate incoming request body JSON fields and POJO class fields in the endpoint
You can use spring-validation library for this More on reddit.com
does anyone know the JSON schema for application.yaml for spring boot?
this plugin provides tons of Jason schema for both yamlls and jsonls. Maybe it could help you More on reddit.com
Videos
15:11
JSON Schema Validation in Rest Assured | API Testing Framework ...
03:16
API Request Validation with JSON Schema - YouTube
21:00
Spring Boot Validate Incoming Json With Json Schema - YouTube
13:11
REST Assured Beginner Tutorial 10 | How to validate JSON Schema ...
08:32
Demo - JSON Validation using JSON Schema in Java || JSON Tutorial ...
11:50
JSON Schema Validation: How to Validate JSON Schema with Postman?
GitHub
github.com โบ JanLoebel โบ json-schema-validation-starter
GitHub - JanLoebel/json-schema-validation-starter: Spring Boot 2 Starter for Json Schema Validation
After that simply create a json-schema and put it into e.g.: resources/jsonschema/book.json. The last step is now to let your entity know that it should be validated and which schema it should use. @JsonSchemaValidation("classpath:jsonschema/book.json") public class Book { private String title; private String author; }
Starred by 9 users
Forked by 6 users
Languages ย Java 100.0% | Java 100.0%
Top answer 1 of 3
15
If you take a look at JSON schema site, there are only two libraries for validation in Java.
- The one that Jorge Campos suggested is mature, but looking for new maintainer: https://github.com/fge/json-schema-validator
- Second one is relatively new: http://github.com/everit-org/json-schema
I was recently in situation where I had to choose one or the other and I picked first option. It is being used also by Rest Assured library under the hood.
2 of 3
2
You can also look at Rest Assured Json Schema validator
https://www.baeldung.com/rest-assured-json-schema
GitHub
github.com โบ rzats โบ json-schema-validator
GitHub - rzats/json-schema-validator: :card_index: A REST service for validating JSON documents against JSON schemas. ยท GitHub
A REST service for validating JSON documents against JSON schemas. Uses Spring Boot for the RESTful web service and RocksDB with the RocksJava bindings as persistent storage.
Author ย rzats
Apache Camel
camel.apache.org โบ apache camel โบ camel components โบ 4.14.x (lts) โบ components โบ json schema validator
JSON Schema Validator :: Apache Camel
The JSON Schema Validator component performs bean validation of the message body against JSON Schemas v4, v6, v7, v2019-09 draft and v2020-12(partial) using the NetworkNT JSON Schema library (https://github.com/networknt/json-schema-validator).
GitHub
github.com โบ networknt โบ json-schema-validator
GitHub - networknt/json-schema-validator: A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12 ยท GitHub
A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12 - networknt/json-schema-validator
Starred by 1K users
Forked by 338 users
Languages ย Java 98.6% | Python 1.4%
GitHub
github.com โบ UnitVectorY-Labs โบ jsonschema4springboot
GitHub - UnitVectorY-Labs/jsonschema4springboot: Add JSON Schema Validation to Spring Boot 3 with Annotations
This library provides an annotation for deserializing JSON in Spring Boot 3 to include JSON Schema validation as part of the process using the networknt/json-schema-validator library.
Author ย UnitVectorY-Labs
GitHub
github.com โบ novotnyr โบ spring-jsonschema-validation
GitHub - novotnyr/spring-jsonschema-validation: Adds support for JSON Schema validation in Spring MVC Controllers
Adds support for JSON Schema validation in Spring MVC Controllers - novotnyr/spring-jsonschema-validation
Starred by 7 users
Forked by 3 users
Languages ย Java 100.0% | Java 100.0%
Java Code Geeks
javacodegeeks.com โบ home โบ enterprise java
JSON Schema validation in Java - Java Code Geeks
August 6, 2020 - In this post we will see how to ... in Java. We will use the same JSON document and Schema as in the previous post about JSON Schema. You can find both as text files on GitHub: JSON document and JSON Schema. We use the networknt JSON Schema validator library in this example. This library seems like a good fit because it supports the latest JSON Schema version (2019-09) and uses Jackson as JSON library. This makes it easy to integrate JSON Schema validation in Spring (hint: upcoming ...
LinkedIn
linkedin.com โบ pulse โบ enforce-json-schema-validation-override-springs-automatic-andy-holst
Enforce JSON schema validation and override Spring's @RequestBody automatic deserialization in Java
August 27, 2021 - Usually when you write RESTful operations such as PUT/POST you usually use Spring's @RequestBody automatic deserialization that literally make any JSON string transformed to the defined request class object defined by the XML Schema Definition "XSD" file. Usually the Jackson "JSON for Java" is loosely configured and accept and unknown JSON properties and literally make any JSON string unmarshalled to the generated Java class object based on the defined XSD contract. However, to be able to do give better conditions for maintenance, by allowing the system to log stack of JSON validation Java method calls with help of an correlation-id, there is good 3rd party libraries that can help you to enforce validate defined JSON schema contract generated from the defined XSD contract with help of some applied JSON schema annotation.
Google Groups
groups.google.com โบ g โบ json-schema-validator โบ c โบ jTB-9KLycPg
Integrate json-schema-validator with Spring and Jackson
I think you already mentioned about Spring integration. Never mind. ... Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message ... I just found this: https://github.com/FasterXML/jackson-databind/commit/3955abb9198e2fddad65c157610e62e301a0c4a7 ยท This is something I am looking for. If you scroll down to the page, you see a test case where the test JSON payload having duplicate keys is validated using:
GitHub
github.com โบ everit-org โบ json-schema
GitHub - everit-org/json-schema: JSON Schema validator for java, based on the org.json API ยท GitHub
Starred by 900 users
Forked by 279 users
Languages ย Java
Maven Repository
mvnrepository.com โบ artifact โบ io.rest-assured โบ json-schema-validator
Maven Repository: io.rest-assured ยป json-schema-validator
January 16, 2026 - Rest-Assured is a Java library for testing REST services.
vvauban
blog.vvauban.com โบ blog โบ spring-boot-json-schema-validation-networknt-in-action
๐๐งฐ SPRING BOOT JSON SCHEMA VALIDATION โ NETWORKNT IN ACTION
November 9, 2025 - โช๏ธ Composable: evolve rules centrally by updating the schema. ๐ธ TRY IT ยท โช๏ธ Clone โ run Spring Boot โ POST to /api/promo/validate with your JSON (valid/invalid) and check the responses.