tModLoader v2024.10
A mod to make and play Terraria mods
JsonDefaultValueAttribute Class Reference

Similar to DefaultValueAttribute but for reference types. It uses a json string that will be used populate this element when initialized. Defines the default value, expressed as json, to be used to populate an object with the NullAllowed attribute. Modders should only use this in conjunction with NullAllowed, as simply initializing the field with a default value is preferred. More...

Inherits Attribute.

Public Member Functions

 JsonDefaultValueAttribute (string json)
 

Properties

string Json [get]
 

Detailed Description

Similar to DefaultValueAttribute but for reference types. It uses a json string that will be used populate this element when initialized. Defines the default value, expressed as json, to be used to populate an object with the NullAllowed attribute. Modders should only use this in conjunction with NullAllowed, as simply initializing the field with a default value is preferred.