Error : key null : expected type is one of JSONObject, found Integer
See original GitHub issueHi, I understand this must be a very straightforward error but I am not able to debug it… I am getting the above error when I load my schema as per your instructions, however I do not have an Integer in my schema, so I dont even know where to start debugging this… Apologies if this is a stupid question.
{
"title": "PS",
"description" : "smth",
"type" : "object",
"properties":{
"PD":{
"description" : "smth",
"type" : "array",
"items" :{
"anyOf": [
{
"type": "string"
},
{
"type":"boolean"
}
]
},
"minimum" : 0
},
"PD2":{
"description" : "smth",
"type" : "array",
"items" :{
"anyOf": [
{
"type": "string"
},
{
"type":"boolean"
},
]
},
"minimum" : 1
},
"currentUser": {
"description" : "smt",
"type" : "string",
"minimum" :1
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
org.everit.json.schema.SchemaException: key null: expected ...
SchemaException: key null: expected type is one of JSONObject, found: Boolean at org.everit.json.schema.loader.internal.
Read more >java - Json schema validation fails - Stack Overflow
The error you're seeing is the SCHEMA fails to validate, because it expects to see a Boolean or a JSON object, but gets...
Read more >How to validate the JSON response with expected JSON ...
expected type : JSONArray, found: JSONObject. When calling like this I get the following error: def responseJson = group_response.
Read more >org.everit.json.schema.SchemaException Java Examples
requireAny(); } catch (SchemaException e) { assertEquals("#: expected type is one of Boolean or JsonObject, found: Integer", e.
Read more >JSONObject
A JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces with colons between the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@erosb Actually solved the issue… It was a combination of dashes and undescores that the schema didn’t like + missed a bracket as well… Thanks for your help anyway!
@MariamNers I’ve just tried out your schema with version
1.5.1
of the library and the schema is loaded successfully, so I couldn’t reproduce the problem.Please create a pull request with a reproduction testcase as it is described in the contributing guidelines. Thanks.