<PackageReference Include="NJsonSchema" Version="7.9.6234.40167" />

ChildSchemaValidationError

A subschema validation error.
using Newtonsoft.Json.Linq; using System.Collections.Generic; namespace NJsonSchema.Validation { public class ChildSchemaValidationError : ValidationError { public IReadOnlyDictionary<JsonSchema4, ICollection<ValidationError>> Errors { get; set; } public ChildSchemaValidationError(ValidationErrorKind kind, string property, string path, IReadOnlyDictionary<JsonSchema4, ICollection<ValidationError>> errors, JToken token) : base(kind, property, path, token) { Errors = errors; } public override string ToString() { string text = string.Format("{0}: {1}\n", new object[2] { base.Kind, base.Path }); foreach (KeyValuePair<JsonSchema4, ICollection<ValidationError>> error in Errors) { text += "{\n"; foreach (ValidationError item in error.Value) { text += string.Format(" {0}\n", new object[1] { item.ToString().Replace("\n", "\n ") }); } text += "}\n"; } return text; } } }