Closed alc-aardvark closed 1 year ago
Which implementation are you using? You mention c#, but we have several for .net (including mine, JsonSchema.Net, for which they are definitely supported).
I am using Microsoft.Json.Schema
From their project repo:
A set of .NET components for working with JSON Schema Draft 4
That's pretty old. I'd recommend you choose a different implementation. All of the ones listed on the implementations page (link above) support at least draft 7, which defines if
/then
/else
.
Thanks all. I am now using JsonSchema.Net .
I have loaded a schema from json-scema.org (here) that contains "anyOf" with 3 If-Then conditions. When I look inside the c# instance for AnyOf, then there are 3 rows but each row is just full of Null values. This leads me to think that If-Then-Else is not yet supported.
I also looked at the test json files and I do not see any with If-Then-Else conditions.