DocFX + Singulink = ♥

Struct JsonList

A JSON list.

Implements
IReadOnlyList<JsonAny>
IReadOnlyCollection<JsonAny>
IEnumerable<JsonAny>
IEnumerable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: SlugBase
Assembly: SlugBase.dll
Syntax
public readonly struct JsonList : IReadOnlyList<JsonAny>, IReadOnlyCollection<JsonAny>, IEnumerable<JsonAny>, IEnumerable

Properties

View Source

Count

Get the number of elements in this list.

Declaration
public int Count { get; }
Property Value
Type Description
int
View Source

this[int]

Get an element from this list.

Declaration
public JsonAny this[int key] { get; }
Parameters
Type Name Description
int key

The index.

Property Value
Type Description
JsonAny

The found value.

Exceptions
Type Condition
JsonException

key is out of range.

Methods

View Source

Get(int)

Get an element from this list.

Declaration
public JsonAny Get(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
JsonAny

The found value.

Exceptions
Type Condition
JsonException

key is out of range.

View Source

GetBool(int)

Get a bool from this list.

Declaration
public bool GetBool(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
bool
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetDouble(int)

Get a double from this list.

Declaration
public double GetDouble(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
double
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetEnumerator()

Gets an enumerator for all elements of this list.

Declaration
public IEnumerator<JsonAny> GetEnumerator()
Returns
Type Description
IEnumerator<JsonAny>
View Source

GetFloat(int)

Get a float from this list.

Declaration
public float GetFloat(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
float
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetInt(int)

Get an int from this list.

Declaration
public int GetInt(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
int
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetList(int)

Get a JsonList from this list.

Declaration
public JsonList GetList(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
JsonList
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetLong(int)

Get a long from this list.

Declaration
public long GetLong(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
long
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetObject(int)

Get a JsonObject from this list.

Declaration
public JsonObject GetObject(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
JsonObject
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

GetString(int)

Get a string from this list.

Declaration
public string GetString(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
string
Exceptions
Type Condition
JsonException

key is out of range or is not the right type.

View Source

TryGet(int)

Get an element from this list.

Declaration
public JsonAny? TryGet(int key)
Parameters
Type Name Description
int key

The index.

Returns
Type Description
JsonAny?

The found value, or null if key is out of range.

Operators

View Source

implicit operator JsonAny(JsonList)

Get list as a JsonAny.

Declaration
public static implicit operator JsonAny(JsonList list)
Parameters
Type Name Description
JsonList list
Returns
Type Description
JsonAny

Implements

IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable