Class SchemaValidationResults
Contains the results of schema validation.
Inheritance
Inherited Members
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public class SchemaValidationResults : IJsonSerializable, IEquatable<SchemaValidationResults>
Constructors
| Improve this Doc View SourceSchemaValidationResults()
This is exposed solely for deserialization purposes.
Declaration
public SchemaValidationResults()
SchemaValidationResults(String, SchemaValidationContext)
Creates a new instance of the SchemaValidationResults class.
Declaration
public SchemaValidationResults(string keyword, SchemaValidationContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | keyword | The name of the keyword producing the result. |
SchemaValidationContext | context | The current validation context when the result is produced. |
Properties
| Improve this Doc View SourceAbsoluteLocation
Gets or sets the absolute location of the keyword. This is a direct reference after all $ref
keywords have been resolved.
Declaration
public Uri? AbsoluteLocation { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Uri> |
AdditionalInfo
Gets or sets any additional information regarding the validation.
Declaration
public JsonObject AdditionalInfo { get; set; }
Property Value
Type | Description |
---|---|
JsonObject |
AnnotationValue
Gets or sets an annotation value.
Declaration
public JsonValue? AnnotationValue { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<JsonValue> |
ErrorMessage
Gets or sets the error message.
Declaration
public string? ErrorMessage { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
InstanceLocation
Gets or sets the location within the instance.
Declaration
public JsonPointer InstanceLocation { get; set; }
Property Value
Type | Description |
---|---|
JsonPointer |
IsValid
Gets or sets whether the validation was successful. Defaults to true.
Declaration
public bool IsValid { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Keyword
Gets or sets the keyword.
Declaration
public string? Keyword { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
NestedResults
Gets or sets any results of nested schemas.
Declaration
public List<SchemaValidationResults> NestedResults { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<SchemaValidationResults> |
Null
Gets a value to return for no results. Only used when a keyword should not produce any output, such as $id
.
Declaration
public static SchemaValidationResults Null { get; }
Property Value
Type | Description |
---|---|
SchemaValidationResults |
RelativeLocation
Gets or sets the location of the keyword relative to the original schema root. This will include any $ref
segments.
Declaration
public JsonPointer RelativeLocation { get; set; }
Property Value
Type | Description |
---|---|
JsonPointer |
Methods
| Improve this Doc View SourceCondense()
Creates a condensed copy of the result.
Declaration
public SchemaValidationResults Condense()
Returns
Type | Description |
---|---|
SchemaValidationResults |
Equals(Nullable<SchemaValidationResults>)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(SchemaValidationResults? other)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<SchemaValidationResults> | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Nullable<Object>)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified object is equal to the current object; otherwise, false. |
Flatten()
Creates a flattened copy of the result.
Declaration
public SchemaValidationResults Flatten()
Returns
Type | Description |
---|---|
SchemaValidationResults |
FromJson(JsonValue, JsonSerializer)
Builds an object from a JsonValue.
Declaration
public void FromJson(JsonValue json, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonValue | json | The JsonValue representation of the object. |
JsonSerializer | serializer | The JsonSerializer instance to use for additional serialization of values. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |
Overrides
ToJson(JsonSerializer)
Converts an object to a JsonValue.
Declaration
public JsonValue ToJson(JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonSerializer | serializer | The JsonSerializer instance to use for additional serialization of values. |
Returns
Type | Description |
---|---|
JsonValue | The JsonValue representation of the object. |