I have a JSON Schema fetched from a DB, Which is now stored in a string in Java. I want to print only a section of schema but not all. How can I split the JSON/String and print.
I have tried converting the String back to JSON format. But not sure how to separate the required content. Also split method didn't worked for me as well.
Input:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"employee_id": {
"type": "string"
},
"course_id": {
"type": "string"
},
"college_id": {
"type": "string"
}
},
"required": [
"employee_id",
"course_id",
"college_id"
]
}
Expected Result:
employee_id, course_id, college_id