Table of Contents

Namespace RuleWright.Serialization

Classes

ActionTypeInfo

Discovery metadata for one action type: its JSON type name, whether it takes a value, and how it changes the outputs. Enumerated from ActionTypes.

ConditionOperatorInfo

Discovery metadata for one condition operator: its JSON spelling, domain enum, and the kind of value it takes. Enumerated from ConditionOperators so a rule-builder UI can populate operator pickers and value editors without hard-coding the vocabulary. Authoritative validation still lives in RuleSetValidator; this is a coarser authoring hint.

ExpressionOperatorInfo

Discovery metadata for one computed-value expression operator: its JSON spelling, domain enum, operand arity, and category. Enumerated from ExpressionOperators.

LogicalOperatorInfo

Discovery metadata for one logical group combinator: its JSON spelling, domain enum, and how many child conditions it accepts. Enumerated from LogicalOperators.

RuleDocumentOptions

Engine-specific vocabulary that structural validation folds into the schema contract. The built-in vocabulary is closed and fixed; the parts that legitimately vary per engine — today the custom action types registered via RuleWrightBuilder.RegisterAction — arrive here, so RuleSetValidator can keep rejecting misspelled action types while accepting the ones this engine actually implements.

RuleHasher

Computes a stable content hash for a rule, used as the compiled-delegate cache key. The hash covers exactly the compilation-relevant content — the condition tree and actions — rendered in a canonical form (sorted keys, invariant number formatting). It is therefore insensitive to JSON whitespace, key order, and the layout, id, description, priority, and enabled members, none of which change the compiled delegate; any change to condition or action content changes the hash and invalidates the cache entry.

RuleJsonValue

A minimal, immutable, library-neutral JSON value tree. JSON reader adapters (System.Text.Json, Newtonsoft.Json, …) translate their own DOM into this type, which keeps RuleWright.Serialization free of any JSON library dependency.

RuleParseException

Thrown when JSON text cannot be parsed at all (malformed JSON), as opposed to well-formed JSON that fails schema validation (RuleValidationException).

RuleSchemaCatalog

The closed authoring vocabulary of RuleWright's rule schema, as structured metadata: the condition operators, logical group combinators, computed-value expression operators, and action types a rule document may use. This is the runtime companion to docs/schema/rule-schema.json — a rule-builder UI can enumerate it to populate its palettes and pickers instead of hard-coding the vocabulary, and it stays in lock-step with the engine because it is derived from the same sources of truth the parser and validator use (RuleWright.Serialization.OperatorMap, RuleWright.Serialization.ExpressionOperatorMap, and the domain enums).

The built-in vocabulary is fixed; the one authoring input that varies per engine is the set of registered custom functions, discoverable via RuleWrightEngine.RegisteredFunctions.

RuleSetParser

Maps a validated JSON document to the immutable RuleSet domain model. The layout key is presentation metadata and is skipped entirely.

RuleSetValidationResult

The outcome of structurally validating a rule document against the RuleWright schema contract (docs/schema/rule-schema.json).

RuleSetValidator

Structurally validates a rule document against the RuleWright schema contract (docs/schema/rule-schema.json) before parsing/compilation, producing errors with JSON pointer paths. Usable standalone — this is the surface a rule-builder UI's real-time validation hooks into.

RuleValidationError

A single structural validation failure, located by a JSON pointer (RFC 6901) into the offending document — the shape a rule-builder UI's real-time validation can bind directly to.

RuleValidationException

Thrown when a well-formed JSON document fails structural validation against the RuleWright schema contract. Carries the individual RuleValidationError entries with their JSON pointer paths.

Interfaces

IRuleJsonReader

Parses JSON text into the neutral RuleJsonValue tree. Implemented by adapter packages (RuleWright.Json.SystemText, RuleWright.Json.NewtonsoftJson) so consumers choose their JSON library instead of RuleWright forcing one.

Enums

ActionEffect

How an action changes the running outputs at its target.

ExpressionOperatorCategory

Broad grouping of a computed-value ExpressionOperator, for UI palettes.

OperatorValueKind

The shape of the comparison value a ConditionOperator expects — a hint for authoring UIs deciding what kind of value editor (if any) to show.

RuleJsonValueKind

The kind of a RuleJsonValue node.