Class DictionaryJsonConverter
public class DictionaryJsonConverter : JsonConverter<Dictionary<string, object>>
- Inheritance
-
DictionaryJsonConverter
- Inherited Members
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type Dictionary<string, object>.
public override Dictionary<string, object> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- Dictionary<string, object>
The converted value.
Write(Utf8JsonWriter, Dictionary<string, object>, JsonSerializerOptions)
Writes a specified value as JSON.
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Base JsonConverter<T>.Write is not annotated; IL2046 prevents [RequiresUnreferencedCode] propagation. DictionaryJsonConverter is only registered by SceneLoader.LoadScene, which is itself [RequiresUnreferencedCode] — reachability transitively requires the attribute.")]
public override void Write(Utf8JsonWriter writer, Dictionary<string, object> value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valueDictionary<string, object>The value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.