Skip to content

JsonCustomArrayLength

Rob edited this page Aug 4, 2026 · 1 revision

JsonCustomArrayLength Class

Attach to a member of a class to indicate a custom minimum length of an array. If the data is longer, the array will be longer
Applicable to ToObject

public sealed class JsonCustomArrayLength : System.Attribute

Inheritance System.Object 🡒 System.Attribute 🡒 JsonCustomArrayLength


Constructors


JsonCustomArrayLength.JsonCustomArrayLength(int) Constructor

Constructor, applies to all sets

public JsonCustomArrayLength(int minlen);
Parameters

minlen System.Int32


JsonCustomArrayLength.JsonCustomArrayLength(string[], int[]) Constructor

Constructor with a list of sets to apply this to.

public JsonCustomArrayLength(string[] setnames, int[] lengths);
Parameters

setnames System.String[]

lengths System.Int32[]


Properties


JsonCustomArrayLength.MinimumLength Property

Set to the minimum length

public int[] MinimumLength { get; set; }
Property Value

System.Int32[]


JsonCustomArrayLength.Sets Property

If non null, this belongs to an attribute set name to check. If null, applies to all sets
Attribute sets allow selection of different outputs from the same class

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

System.String[]

Clone this wiki locally