Class JsonTransformRule
- Namespace
- Excalibur.EventSourcing.Upcasting
- Assembly
- Excalibur.EventSourcing.dll
A single JSON transformation rule that describes a property-level operation on a serialized event.
public sealed record JsonTransformRule : IEquatable<JsonTransformRule>
- Inheritance
-
JsonTransformRule
- Implements
- Inherited Members
Constructors
JsonTransformRule(JsonTransformOperation, string, string?, object?)
A single JSON transformation rule that describes a property-level operation on a serialized event.
public JsonTransformRule(JsonTransformOperation Operation, string Path, string? TargetPath = null, object? DefaultValue = null)
Parameters
OperationJsonTransformOperationThe transformation operation to apply.
PathstringThe source JSON property name.
TargetPathstringThe target JSON property name (for rename and move operations).
DefaultValueobjectThe default value to set (for add default operations).
Properties
DefaultValue
The default value to set (for add default operations).
public object? DefaultValue { get; init; }
Property Value
Operation
The transformation operation to apply.
public JsonTransformOperation Operation { get; init; }
Property Value
Path
The source JSON property name.
public string Path { get; init; }
Property Value
TargetPath
The target JSON property name (for rename and move operations).
public string? TargetPath { get; init; }