JsonIgnoreAttribute - robbyxp1/QuickJSON GitHub Wiki


JsonIgnoreAttribute Class

Ignore attribute. Attach to an member of a class to say don't serialise this item or
to exclude certain members or to only include specific members
Applicable to FromObject and ToObject

public sealed class JsonIgnoreAttribute : System.Attribute

Inheritance System.Object 🡒 System.Attribute 🡒 JsonIgnoreAttribute


Constructors


JsonIgnoreAttribute.JsonIgnoreAttribute() Constructor

FromObject and ToObject: Constructor to indicate that this member should be ignored completely for all sets

public JsonIgnoreAttribute();


JsonIgnoreAttribute.JsonIgnoreAttribute(Operation, string[]) Constructor

FromObject: Constructor to indicate which members of this class to enumerate to JSON for the default set only
If Ignore, name list are the members which should be excluded. All others will be included
If Include, name list are only the members which will be included, all others will be excluded.
ToObject: the setting is ignored and the member processed as normal

public JsonIgnoreAttribute(QuickJSON.JsonIgnoreAttribute.Operation ignoreorinclude, params string[] names);
Parameters

ignoreorinclude Operation

names System.String[]


JsonIgnoreAttribute.JsonIgnoreAttribute(string, Operation, string[], string, Operation, string[]) Constructor

FromObject: Constructor to indicate which members of this class to enumerate to JSON, by set and with include/ignore attributes, twice
ToObject: the setting is ignored and the member processed as normal

public JsonIgnoreAttribute(string setname1, QuickJSON.JsonIgnoreAttribute.Operation ignoreorinclude1, string[] names1, string setname2, QuickJSON.JsonIgnoreAttribute.Operation ignoreorinclude2, string[] names2);
Parameters

setname1 System.String

ignoreorinclude1 Operation

names1 System.String[]

setname2 System.String

ignoreorinclude2 Operation

names2 System.String[]


JsonIgnoreAttribute.JsonIgnoreAttribute(string, Operation, string[], string, Operation, string[], string, Operation, string[]) Constructor

FromObject: Constructor to indicate which members of this class to enumerate to JSON, by set and with include/ignore attributes, three times
ToObject: the setting is ignored and the member processed as normal

public JsonIgnoreAttribute(string setname1, QuickJSON.JsonIgnoreAttribute.Operation ignoreorinclude1, string[] names1, string setname2, QuickJSON.JsonIgnoreAttribute.Operation ignoreorinclude2, string[] names2, string setname3, QuickJSON.JsonIgnoreAttribute.Operation ignoreorinclude3, string[] names3);
Parameters

setname1 System.String

ignoreorinclude1 Operation

names1 System.String[]

setname2 System.String

ignoreorinclude2 Operation

names2 System.String[]

setname3 System.String

ignoreorinclude3 Operation

names3 System.String[]


JsonIgnoreAttribute.JsonIgnoreAttribute(string[]) Constructor

FromObject and ToObject: Constructor to indicate that this member should be ignored completely for this list of sets
For other sets the member is not ignored

public JsonIgnoreAttribute(params string[] setnames);
Parameters

setnames System.String[]


Properties


JsonIgnoreAttribute.Setting Property

Settings of the ignore by set. Null if just ignore all

public QuickJSON.JsonIgnoreAttribute.SetSetting[] Setting { get; set; }
Property Value

SetSetting[]


Classes

Classes
JsonIgnoreAttribute.SetSetting Class to hold a JSON ignore setting for a single set

Enums


JsonIgnoreAttribute.Operation Enum

Options for FromObject only.

public enum JsonIgnoreAttribute.Operation
Fields

Ignore 0
Use ignore to say the list is a set of members to ignore

Include 1
Use include to say the list is a set of members only to include

⚠️ **GitHub.com Fallback** ⚠️