Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateDataExtensionProperty()

static void System.Text.Json.JsonSerializer.CreateDataExtensionProperty ( object obj,
JsonPropertyInfo jsonPropertyInfo,
JsonSerializerOptions options )
inlinestaticpackage

Definition at line 738 of file JsonSerializer.cs.

739 {
740 object obj2 = jsonPropertyInfo.GetValueAsObject(obj);
741 if (obj2 != null)
742 {
743 return;
744 }
745 if (jsonPropertyInfo.RuntimeTypeInfo.CreateObject == null)
746 {
747 if (jsonPropertyInfo.DeclaredPropertyType.FullName == "System.Text.Json.Nodes.JsonObject")
748 {
749 obj2 = jsonPropertyInfo.ConverterBase.CreateObject(options);
750 }
751 else
752 {
753 ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(jsonPropertyInfo.DeclaredPropertyType);
754 }
755 }
756 else
757 {
758 obj2 = jsonPropertyInfo.RuntimeTypeInfo.CreateObject();
759 }
760 jsonPropertyInfo.SetExtensionDictionaryAsObject(obj, obj2);
761 }

References System.obj, System.options, and System.Text.Json.ThrowHelper.ThrowNotSupportedException_SerializationNotSupported().

Referenced by System.Text.Json.JsonSerializer.LookupProperty(), and System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter< T >.OnTryRead().