"date" type inside Json schema

I have next Json schema:

string jsonSchema = @"{
  ""properties"": {
                ""dateOfEvent"": {
                    ""type"": ""date"",

and I want to validate input JSON by this schema. I trying to use Microsoft.Json.Schema and Microsoft.Json.Schema.Validation, but I have: "Exception of type 'Microsoft.Json.Schema.SchemaValidationException' was thrown." on next line of my code:

using (var reader = new StringReader(jsonSchema))
    var schema = SchemaReader.ReadSchema(reader, string.Empty);
    //some code for validation

Can anybody explain me what's wrong and how I can use this jsonSchema for JSON validation?

Read more here: https://stackoverflow.com/questions/64940650/date-type-inside-json-schema

Content Attribution

This content was originally published by Mixim at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: