Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Roberto Marzialetti
Roberto MarzialettiPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 4 December 2020 at 20:40
Updated 5 August 2022 at 09:03
Code:
<cfset schema = '{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Patient",
"description": "Patient of catalogue",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"genre": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"required": [
"name",
"doctor"
]
}'>
<cfset json = '{
"name": 11,
"genre": {
"code": 3
}
}'>
<cfset result = ValidateJson(json, schema, false)>
<cfdump var="#result#">
This code generates only one error:
Whereas the Validator Json Schema shows three errors:
(https://www.jsonschemavalidator.net/ 1)
Here discussion on forum:
https://dev.lucee.org/t/bug-or-incomplete-report-in-validatejson/7694