Class SideEffectJsonConverter
Serializes side effects while preserving typed payload contracts when registered. When a payload contract is unknown at read time, the converter falls back to inferred dictionary and list materialization so side effect meaning is not lost.
Inherited Members
Namespace: ModularityKit.Mutator.Abstractions.Effects
Assembly: ModularityKit.Mutator.dll
Syntax
public sealed class SideEffectJsonConverter : JsonConverter<SideEffect>
Methods
| Edit this page View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type SideEffect.
Declaration
public override SideEffect Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | The reader. |
| Type | typeToConvert | The type to convert. |
| JsonSerializerOptions | options | An object that specifies serialization options to use. |
Returns
| Type | Description |
|---|---|
| SideEffect | The converted value. |
Overrides
| Edit this page View SourceWrite(Utf8JsonWriter, SideEffect, JsonSerializerOptions)
Writes a specified value as JSON.
Declaration
public override void Write(Utf8JsonWriter writer, SideEffect value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | The writer to write to. |
| SideEffect | value | The value to convert to JSON. |
| JsonSerializerOptions | options | An object that specifies serialization options to use. |