I have json schema and value to compare against it. I have implemented it using Newtonsoft.Json.Schema. But now realised that it is not for free use. I then tried to implement is using NJsonScehma nuget package but now getting the below error on last line of code.
cannot convert from 'Newtonsoft.Json.Linq.JToken' to 'Newtonsoft.Json.Schema.JsonSchema'
Below is my code. Any idea how to resolve this. TIA.
var jsonSchema = JObject.Parse(schemafile); //schema definition
JToken json = JToken.Parse(value);//value to validate against schema
var result = jsonSchema.Validate(json);