Table of Contents

Method Validate

Namespace
RuleWright.Serialization
Assembly
RuleWright.Serialization.dll

Validate(RuleJsonValue)

Validates a parsed JSON document as a rule or rule set, against the built-in vocabulary only.

public static RuleSetValidationResult Validate(RuleJsonValue document)

Parameters

document RuleJsonValue

The document root.

Returns

RuleSetValidationResult

A result carrying zero or more pointer-addressed errors.

Exceptions

ArgumentNullException

document is null.

Validate(RuleJsonValue, RuleDocumentOptions?)

Validates a parsed JSON document as a rule or rule set, folding an engine's registered vocabulary (custom action types) into the schema contract. This is the overload RuleWrightEngine.Validate uses, so documents that name that engine's registered actions validate cleanly while misspellings are still rejected.

public static RuleSetValidationResult Validate(RuleJsonValue document, RuleDocumentOptions? options)

Parameters

document RuleJsonValue

The document root.

options RuleDocumentOptions

The engine-registered vocabulary, or null for the built-ins only.

Returns

RuleSetValidationResult

A result carrying zero or more pointer-addressed errors.

Exceptions

ArgumentNullException

document is null.