Skip to content

JsonAlwaysCreate

Rob edited this page Aug 4, 2026 · 1 revision

JsonAlwaysCreate Class

Attach to a member of a class to indicate that it must be made, and must not be null
Default constructor will be called if required
Applicable to ToObject.

public sealed class JsonAlwaysCreate : System.Attribute

Inheritance System.Object 🡒 System.Attribute 🡒 JsonAlwaysCreate


Constructors


JsonAlwaysCreate.JsonAlwaysCreate() Constructor

List of names for this attribute

public JsonAlwaysCreate();


JsonAlwaysCreate.JsonAlwaysCreate(string[]) Constructor

Constructor with set names.

public JsonAlwaysCreate(string[] sets);
Parameters

sets System.String[]


Properties


JsonAlwaysCreate.Sets Property

If non null, this lists the names of the sets associated with the name list.
Must be the same length as Names list
sets can be mentioned more than once to get multiple names accepted.
Attribute sets allow selection of different inputs and outputs from the same class

public string[] Sets { get; set; }
Property Value

System.String[]

Clone this wiki locally