Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ObjectConverter.cs
Go to the documentation of this file.
2
3internal sealed class ObjectConverter : JsonConverter<object>
4{
9
11 {
12 if (options.UnknownTypeHandling == JsonUnknownTypeHandling.JsonElement)
13 {
14 return JsonElement.ParseValue(ref reader);
15 }
17 }
18
20 {
21 writer.WriteStartObject();
22 writer.WriteEndObject();
23 }
24
30
41
43 {
44 if (options.UnknownTypeHandling == JsonUnknownTypeHandling.JsonElement)
45 {
46 return JsonElement.ParseValue(ref reader);
47 }
48 return JsonNodeConverter.Instance.Read(ref reader, typeof(object), options);
49 }
50}
override object ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
override object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
override object ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
override void WriteAsPropertyNameCore(Utf8JsonWriter writer, object value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
override void Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options)
static void ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type keyType, JsonConverter converter)
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408
static JsonElement ParseValue(ref Utf8JsonReader reader)