Custom JSON converter for serializing and deserializing ImmutableDictionary<string, object?> using System.Text.Json.
More...
|
| override ImmutableDictionary< string, object?> | Read (ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) |
| | Reads and converts JSON to an ImmutableDictionary<string, object?>. Handles different token types and ensures proper deserialization.
|
| override void | Write (Utf8JsonWriter writer, ImmutableDictionary< string, object?> value, JsonSerializerOptions options) |
| | Writes the specified ImmutableDictionary<string, object?> to JSON. Iterates over key-value pairs to handle serialization.
|
Custom JSON converter for serializing and deserializing ImmutableDictionary<string, object?> using System.Text.Json.
◆ Read()
| override ImmutableDictionary< string, object?> Buzzware.Cascade.ImmutableDictionaryJsonConverter.Read |
( |
ref Utf8JsonReader | reader, |
|
|
Type | typeToConvert, |
|
|
JsonSerializerOptions | options ) |
|
inline |
Reads and converts JSON to an ImmutableDictionary<string, object?>. Handles different token types and ensures proper deserialization.
- Parameters
-
| reader | The reference to the JSON reader. |
| typeToConvert | The type of object to convert, used for validation. |
| options | Serializer options for custom conversions. |
- Returns
- Deserialized dictionary from JSON.
◆ Write()
| override void Buzzware.Cascade.ImmutableDictionaryJsonConverter.Write |
( |
Utf8JsonWriter | writer, |
|
|
ImmutableDictionary< string, object?> | value, |
|
|
JsonSerializerOptions | options ) |
|
inline |
Writes the specified ImmutableDictionary<string, object?> to JSON. Iterates over key-value pairs to handle serialization.
- Parameters
-
| writer | JSON writer to output the JSON. |
| value | The dictionary value to serialize. |
| options | Serializer options for custom conversions. |
The documentation for this class was generated from the following file:
- Buzzware.Cascade/utilities/ImmutableDictionaryJsonConverter.cs