JsonArray

JsonArray class

class JsonArray : public System::Text::Json::Nodes::JsonNode,
                  public System::Collections::Generic::IList<System::SharedPtr<JsonNode>>

Methods

MethodDescription
virtual void _add_range(std::initializer_list<T>)Adds a range of elements to the collection.
void Add(const System::SharedPtr<JsonNode>&) override
virtual void Add(const T&)Adds element into collection.
System::SharedPtr<JsonArray> AsArray()
System::SharedPtr<JsonObject> AsObject()
System::SharedPtr<JsonValueBase> AsValue()
iterator begin()Gets iterator pointing to the first element (if any) of the collection. This iterator can’t be used to change a referenced object because GetEnumerator() returns a copy-object of T.
const_iterator begin() constGets iterator pointing to the first element (if any) of the const-qualified instance of the collection.
const_iterator cbegin() constGets iterator pointing to the first const-qualified element (if any) of the collection.
const_iterator cend() constGets iterator pointing right after the last const-qualified element (if any) of the collection.
void Clear() overrideDeletes all elements from collection.
bool Contains(const System::SharedPtr<JsonNode>&) const override
virtual bool Contains(const T&) constChecks if element is present in collection.
virtual void CopyTo(System::ArrayPtr<T>, int)Copies all collection elements to existing array elements.
static System::SharedPtr<JsonArray> Create(JsonElement, Nullable<JsonNodeOptions>)
System::SharedPtr<JsonNode> DeepClone()
static bool DeepEquals(System::SharedPtr<JsonNode>, System::SharedPtr<JsonNode>)
iterator end()Gets iterator pointing right after the last element (if any) of the collection. This iterator can’t be used to change a referenced object because GetEnumerator() returns a copy-object of T.
const_iterator end() constGets iterator pointing right after the last element (if any) of the const-qualified instance of the collection.
virtual bool Equals(ptr)Compares objects using C# Object.Equals semantics.
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares reference type objects in C# style.
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares value type objects in C# style.
static bool Equals(float const&, float const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static bool Equals(double const&, double const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
virtual bool FastCast(const Details::FastRttiBase&, void **) constFor internal purposes only.
int32_t get_Count() const overrideGets number of elements in collection.
bool get_IsFixedSize()Checks whether the collection is of fixed size.
Nullable<JsonNodeOptions> get_Options()
System::SharedPtr<JsonNode> get_Parent()
System::SharedPtr<JsonNode> get_Root()
SharedPtr<Object> get_SyncRoot() constGets the object the collection is being synchronized through.
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
int32_t GetElementIndex()
System::SharedPtr<Collections::Generic::IEnumerator<System::SharedPtr<JsonNode>>> GetEnumerator() overrideGets enumerator.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
String GetPath()
String GetPropertyName()
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
T GetValue()
JsonValueKind GetValueKind()
System::SharedPtr<Collections::Generic::IEnumerable<T>> GetValues()
ICollection()Default constructor.
ICollection(const ICollection&)Copy constructor.
ICollection(ICollection&&)Move constructor.
System::SharedPtr<JsonNode> idx_get(int) const overrideGets element at specified index.
System::SharedPtr<JsonNode> idx_get(int32_t)
System::SharedPtr<JsonNode> idx_get(String)
void idx_set(int, System::SharedPtr<JsonNode>) override
void idx_set(int32_t, System::SharedPtr<JsonNode>)
void idx_set(String, System::SharedPtr<JsonNode>)
virtual void idx_set(int, T)Sets element at specified index.
int32_t IndexOf(const System::SharedPtr<JsonNode>&) const override
virtual int IndexOf(const T&) constGets index of first appearance of item in container.
void Insert(int32_t, const System::SharedPtr<JsonNode>&) override
virtual void Insert(int, const T&)Inserts element into specified position, shifting other elements.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
JsonArray(Nullable<JsonNodeOptions>)
JsonArray(JsonNodeOptions, const System::SharedPtr<Array<System::SharedPtr<JsonNode>>>&)
JsonArray(const System::SharedPtr<Array<System::SharedPtr<JsonNode>>>&)
T LINQ_Aggregate(const Func<T, T, T>&)Applies an accumulator function over a sequence.
bool LINQ_All(std::function<bool(T)>)Determines whether all elements of a sequence satisfy a condition.
bool LINQ_Any()Determines whether a sequence contains any elements.
bool LINQ_Any(std::function<bool(T)>)Determines whether any element of a sequence exists or satisfies a condition.
T LINQ_Average()Computes the average of a sequence of numeric values.
ResultType LINQ_Average(const Func<T, ResultType>&)Computes the average of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
ResultType LINQ_Average(const Func<Source, ResultType>&)
SharedPtr<IEnumerable<ResultType>> LINQ_Cast()Casts the elements to the specified type.
SharedPtr<IEnumerable<Result>> LINQ_Cast()
SharedPtr<IEnumerable<T>> LINQ_Concat(SharedPtr<IEnumerable<T>>)Concatenates two sequences.
bool LINQ_Contains(T)Determines if a sequence contains a specified value.
int LINQ_Count()Returns the number of elements in the sequence (calculated via direct counting).
int LINQ_Count(const Func<T, bool>&)Returns the number of elements in the sequence that satisfy the specified condition.
SharedPtr<IEnumerable<T>> LINQ_Distinct()Returns distinct elements from a sequence by using the default equality comparer to compare values.
T LINQ_ElementAt(int)Returns the element at a specified index in a sequence.
T LINQ_ElementAtOrDefault(int)Returns the element at a specified index in a sequence.
T LINQ_First()Returns the first element of a sequence.
T LINQ_First(const Func<T, bool>&)Returns the first element of a sequence that satisfy the specified condition.
T LINQ_FirstOrDefault()Returns the first element of a sequence, or a default value if the sequence is empty.
T LINQ_FirstOrDefault(std::function<bool(T)>)Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
System::SharedPtr<IEnumerable<System::SharedPtr<System::Linq::IGrouping<Key, T>>>> LINQ_GroupBy(System::Func<T, Key>)Groups the elements of a sequence.
System::SharedPtr<IEnumerable<System::SharedPtr<System::Linq::IGrouping<Key, Element>>>> LINQ_GroupBy(System::Func<T, Key>, System::Func<T, Element>)Groups the elements of a sequence.
SharedPtr<IEnumerable<SharedPtr<System::Linq::IGrouping<Key, Source>>>> LINQ_GroupBy(System::Func<Source, Key>)
SharedPtr<IEnumerable<SharedPtr<System::Linq::IGrouping<Key, Element>>>> LINQ_GroupBy(System::Func<Source, Key>, System::Func<Source, Element>)
T LINQ_Last()Returns the last element of a sequence.
T LINQ_LastOrDefault()Returns the last element of a sequence, or a default value if the sequence is empty.
T LINQ_Max()Returns maximal element of the sequence.
ResultType LINQ_Max(const Func<T, ResultType>&)Invokes a transform function on each element of a generic sequence and returns the maximum resulting value.
ResultType LINQ_Max(const Func<Source, ResultType>&)
T LINQ_Min()Returns minimal element of the sequence.
ResultType LINQ_Min(const Func<T, ResultType>&)Invokes a transform function on each element of a generic sequence and returns the minimum resulting value.
ResultType LINQ_Min(const Func<Source, ResultType>&)
SharedPtr<IEnumerable<ResultType>> LINQ_OfType()Filters the elements of the sequence based on the specified type.
SharedPtr<IEnumerable<Result>> LINQ_OfType()
SharedPtr<Linq::IOrderedEnumerable<T>> LINQ_OrderBy(const Func<T, Key>&)Sorts the elements of a sequence in ascending order according to the key values selected by keySelector.
SharedPtr<Linq::IOrderedEnumerable<Source>> LINQ_OrderBy(const Func<Source, Key>&)
SharedPtr<Linq::IOrderedEnumerable<T>> LINQ_OrderByDescending(const Func<T, Key>&)Sorts the elements of a sequence in descending order according to the key values selected by keySelector.
SharedPtr<Linq::IOrderedEnumerable<Source>> LINQ_OrderByDescending(const Func<Source, Key>&)
SharedPtr<IEnumerable<T>> LINQ_Reverse()Inverts the order of the elements in a sequence.
SharedPtr<IEnumerable<ResultType>> LINQ_Select(const Func<T, ResultType>&)Transforms elements of a sequence.
SharedPtr<IEnumerable<ResultType>> LINQ_Select(const Func<T, int32_t, ResultType>&)Transforms each element of a sequence into a new form by incorporating the element’s index.
SharedPtr<IEnumerable<Result>> LINQ_Select(const Func<Source, Result>&)
SharedPtr<IEnumerable<Result>> LINQ_Select(const Func<Source, int32_t, Result>&)
SharedPtr<IEnumerable<ResultType>> LINQ_SelectMany(const Func<T, SharedPtr<IEnumerable<ResultType>>>&)Projects each element of a sequence and combines the resulting sequences into one sequence.
SharedPtr<IEnumerable<Result>> LINQ_SelectMany(const Func<Source, SharedPtr<IEnumerable<Result>>>&)
bool LINQ_SequenceEqual(SharedPtr<IEnumerable<T>>, const SharedPtr<IEqualityComparer<T>>&)Compares two sequences.
bool LINQ_SequenceEqual(SharedPtr<IEnumerable<T>>)Compares two sequences.
T LINQ_Single()Returns the single elemet of the sequence and throws an exception if there are zero or more than one element.
T LINQ_Single(const Func<T, bool>&)Returns the single elemet of the sequence that satisfies a condition and throws an exception if there are zero or more than one such elements.
T LINQ_SingleOrDefault()Returns the single elemet of the sequence or default value if there are zero or more than one element.
T LINQ_SingleOrDefault(const Func<T, bool>&)Returns the single elemet of the sequence that satisfies a condition or default value if there are zero or more than one such elements.
SharedPtr<IEnumerable<T>> LINQ_Skip(int32_t)Skip a specified number of contiguous elements from the start of a sequence and returns rest.
T LINQ_Sum()Computes the sum of all elelments in the sequence.
SharedPtr<IEnumerable<T>> LINQ_Take(int32_t)Returns a specified number of contiguous elements from the start of a sequence.
System::ArrayPtr<T> LINQ_ToArray()Creates an array from a sequence.
SharedPtr<List<T>> LINQ_ToList()Creates a List<T> from a sequence.
SharedPtr<IEnumerable<T>> LINQ_Where(std::function<bool(T)>)Filters a sequence based on the specified predicate.
SharedPtr<IEnumerable<TResult>> LINQ_Zip(SharedPtr<IEnumerable<TSecond>>, const Func<T, TSecond, TResult>&)Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
SharedPtr<IEnumerable<TResult>> LINQ_Zip(SharedPtr<IEnumerable<TSecond>>, const Func<TFirst, TSecond, TResult>&)
void Lock()Implements C# lock() statement locking. Call directly or use LockContext sentry object.
virtual ptr MemberwiseClone() constAnalog of C# Object.MemberwiseClone() method. Enables cloning custom types.
Object()Creates object. Initializes all internal data structures.
Object(Object const&)Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Object& operator=(Object const&)Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
ICollection& operator=(ICollection&&)Move assignment operator.
ICollection& operator=(const ICollection&)Move assignment operator.
static System::SharedPtr<JsonNode> Parse(Utf8JsonReader&, Nullable<JsonNodeOptions>)
static System::SharedPtr<JsonNode> Parse(String, Nullable<JsonNodeOptions>, JsonDocumentOptions)
static System::SharedPtr<JsonNode> Parse(ReadOnlySpan<uint8_t>, Nullable<JsonNodeOptions>, JsonDocumentOptions)
static System::SharedPtr<JsonNode> Parse(System::SharedPtr<IO::Stream>, Nullable<JsonNodeOptions>, JsonDocumentOptions)
static bool ReferenceEquals(ptr const&, ptr const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t)Reference-compares value type object with nullptr.
bool ReferenceEquals(String const&, std::nullptr_t)Specialization of Object::ReferenceEquals for case of string and nullptr.
bool ReferenceEquals(String const&, String const&)Specialization of Object::ReferenceEquals for case of strings.
bool Remove(const System::SharedPtr<JsonNode>&) override
virtual bool Remove(const T&)Deletes element from collection.
int32_t RemoveAll(Func<System::SharedPtr<JsonNode>, bool>)
void RemoveAt(int32_t) override
virtual void RemoveAt(int)Removes element at specified index.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
void RemoveRange(int32_t, int32_t)
virtual void SetTemplateWeakPtr(uint32_t)Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
int SharedCount() constGets current value of shared reference counter.
Object * SharedRefAdded()Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
int SharedRefRemovedSafe()Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
static bool to_Boolean(System::SharedPtr<JsonNode>)
static Nullable<bool> to_BooleanNullable(System::SharedPtr<JsonNode>)
static uint8_t to_Byte(System::SharedPtr<JsonNode>)
static Nullable<uint8_t> to_ByteNullable(System::SharedPtr<JsonNode>)
static char16_t to_Char(System::SharedPtr<JsonNode>)
static Nullable<char16_t> to_CharNullable(System::SharedPtr<JsonNode>)
static DateTime to_DateTime(System::SharedPtr<JsonNode>)
static Nullable<DateTime> to_DateTimeNullable(System::SharedPtr<JsonNode>)
static DateTimeOffset to_DateTimeOffset(System::SharedPtr<JsonNode>)
static Nullable<DateTimeOffset> to_DateTimeOffsetNullable(System::SharedPtr<JsonNode>)
static Decimal to_Decimal(System::SharedPtr<JsonNode>)
static Nullable<Decimal> to_DecimalNullable(System::SharedPtr<JsonNode>)
static double to_Double(System::SharedPtr<JsonNode>)
static Nullable<double> to_DoubleNullable(System::SharedPtr<JsonNode>)
static Guid to_Guid(System::SharedPtr<JsonNode>)
static Nullable<Guid> to_GuidNullable(System::SharedPtr<JsonNode>)
static int16_t to_Int16(System::SharedPtr<JsonNode>)
static Nullable<int16_t> to_Int16Nullable(System::SharedPtr<JsonNode>)
static int32_t to_Int32(System::SharedPtr<JsonNode>)
static Nullable<int32_t> to_Int32Nullable(System::SharedPtr<JsonNode>)
static int64_t to_Int64(System::SharedPtr<JsonNode>)
static Nullable<int64_t> to_Int64Nullable(System::SharedPtr<JsonNode>)
static System::SharedPtr<JsonNode> to_JsonNode(bool)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<bool>)
static System::SharedPtr<JsonNode> to_JsonNode(uint8_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<uint8_t>)
static System::SharedPtr<JsonNode> to_JsonNode(char16_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<char16_t>)
static System::SharedPtr<JsonNode> to_JsonNode(DateTime)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<DateTime>)
static System::SharedPtr<JsonNode> to_JsonNode(DateTimeOffset)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<DateTimeOffset>)
static System::SharedPtr<JsonNode> to_JsonNode(Decimal)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<Decimal>)
static System::SharedPtr<JsonNode> to_JsonNode(double)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<double>)
static System::SharedPtr<JsonNode> to_JsonNode(Guid)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<Guid>)
static System::SharedPtr<JsonNode> to_JsonNode(int16_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<int16_t>)
static System::SharedPtr<JsonNode> to_JsonNode(int32_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<int32_t>)
static System::SharedPtr<JsonNode> to_JsonNode(int64_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<int64_t>)
static System::SharedPtr<JsonNode> to_JsonNode(int8_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<int8_t>)
static System::SharedPtr<JsonNode> to_JsonNode(float)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<float>)
static System::SharedPtr<JsonNode> to_JsonNode(String)
static System::SharedPtr<JsonNode> to_JsonNode(uint16_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<uint16_t>)
static System::SharedPtr<JsonNode> to_JsonNode(uint32_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<uint32_t>)
static System::SharedPtr<JsonNode> to_JsonNode(uint64_t)
static System::SharedPtr<JsonNode> to_JsonNode(Nullable<uint64_t>)
static int8_t to_SByte(System::SharedPtr<JsonNode>)
static Nullable<int8_t> to_SByteNullable(System::SharedPtr<JsonNode>)
static float to_Single(System::SharedPtr<JsonNode>)
static Nullable<float> to_SingleNullable(System::SharedPtr<JsonNode>)
static String to_String(System::SharedPtr<JsonNode>)
static uint16_t to_UInt16(System::SharedPtr<JsonNode>)
static Nullable<uint16_t> to_UInt16Nullable(System::SharedPtr<JsonNode>)
static uint32_t to_UInt32(System::SharedPtr<JsonNode>)
static Nullable<uint32_t> to_UInt32Nullable(System::SharedPtr<JsonNode>)
static uint64_t to_UInt64(System::SharedPtr<JsonNode>)
static Nullable<uint64_t> to_UInt64Nullable(System::SharedPtr<JsonNode>)
String ToJsonString(System::SharedPtr<JsonSerializerOptions>)
String ToString() const overrideAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static const TypeInfo& Type()Implements C# typeof(System.Object) construct.
void Unlock()Implements C# lock() statement unlocking. Call directly or use LockContext sentry object.
virtual virtualized_iterator * virtualizeBeginConstIterator() constGets the implementation of begin const iterator for the current container.
virtual virtualized_iterator * virtualizeBeginIterator()Gets the implementation of begin iterator for the current container.
virtual virtualized_iterator * virtualizeEndConstIterator() constGets the implementation of end const iterator for the current container.
virtual virtualized_iterator * virtualizeEndIterator()Gets the implementation of end iterator for the current container.
Detail::SmartPtrCounter * WeakRefAdded()Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WeakRefRemoved()Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WriteTo(System::SharedPtr<Utf8JsonWriter>, System::SharedPtr<JsonSerializerOptions>) override
virtual ~ICollection()Destructor.
virtual ~Object()Destroys object. Frees all internal data structures.

See Also