This is the JSON:
{"id":1,"name":"abc","tech":"java"}
JSON Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"tech": {
"type": "string"
}
},
"required": [
"id",
"name",
"tech"
]
}
How do I convert JSON to JSON Schema using Java?
What are the inbuilt functions I need to use here? My goal is to not use a standalone tool because I want to generate it on runtime using Java in program.