Open ChrisLynchHPE opened 8 years ago
I think this is not a draft v4 schema...
Try removing all required attributes.. in draft v4 required contains a list of the required properties..
Not sure I completely understand. Are you suggesting that I remove the "required" property/attribute in the schema file I manually created?
Okay, so I did a bit more research, and I believe I created a JSON v4 Schema. I usedhttp://jsonschema.net/#/ to create the schema. Here is the updated schema: HPOneView.300_CmdletHelp.json.txt
And when I use the schema file, I now get a different error:
Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'Newtonsoft.Json.Linq.JObject'.
The property items
is used to describe a tuple type (I.e. it must be an array of schemas. I think in your case you need the item
property which describes the array item type...
I used http://jsonschema.net/#/ to create the JSON v4 Schema file. The JSON object is quite simple. It is an Array of an Object that is very specific. The Object contains a String attribute called Name
, then an Object called Contents
. Contents
contains nested objects and arrays.
Is there any way to debug your tool to find out where exactly it is generating the error?
You can clone or download the source code and run it with debugger attached.. can you provide a sample json and json schema v4?
I'm getting the following error when I attempt to load my JSON file with what I believe is a valid JSON Schema:
I have attached the JSON Schema file, and a sample JSON file that contains the data for your reference.
My system is a Windows 10 PC (Insider Fast Ring, 14376) and v1.4.5944.34935 of your Visual JSON Editor.
HPOneView.300_CmdletHelp.json.txt Test.json.txt