question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error : key null : expected type is one of JSONObject, found Integer

See original GitHub issue

Hi, 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
MariamNerscommented, Apr 11, 2017

@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!

0reactions
erosbcommented, Apr 11, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found