• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Class JsonArray

This class represents JArray in JSON standards.

Inheritance
System.Object
JsonValueBase
JsonArray
Inherited Members
JsonValueBase.DataType
JsonValueBase.Parse(String)
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Serializable]
public sealed class JsonArray : JsonValueBase, IJsonArray, ICollection<JsonValueBase>, IEnumerable<JsonValueBase>, IEnumerable

Constructors

JsonArray()

The default constructor of class JsonArray.

Declaration
public JsonArray()

JsonArray(String)

An overloaded constructor that takes JsonArray object in string format.

Declaration
public JsonArray(string json)
Parameters
Type Name Description
System.String json

JSONArray object in string format.

Properties

Count

This property gets total items in array.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Number of items in array.

InMemorySize

This property gets memory size of the JSONArray.

Declaration
protected override int InMemorySize { get; }
Property Value
Type Description
System.Int32

Size of the memory.

Overrides
JsonValueBase.InMemorySize

Item[Int32]

Indexer for the JSON Arary.

Declaration
public JsonValueBase this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index

Index of the item.

Property Value
Type Description
JsonValueBase

JSON value on that index.

Implements
IJsonArray.Item[Int32]

Size

This property gets the size of the JSONArray.

Declaration
protected override int Size { get; }
Property Value
Type Description
System.Int32

Size of the JSONArray.

Overrides
JsonValueBase.Size

Value

This property initializes JSONArray instance.

Declaration
public override object Value { get; }
Property Value
Type Description
System.Object

Value of JSONArray instance.

Overrides
JsonValueBase.Value

Methods

Add(JsonValue)

Adds JSONValue item to array.

Declaration
public void Add(JsonValue item)
Parameters
Type Name Description
JsonValue item

JSONValue to be added.

Implements
IJsonArray.Add(JsonValue)

Add(JsonValueBase)

Adds JSONValueBase item to array.

Declaration
public void Add(JsonValueBase item)
Parameters
Type Name Description
JsonValueBase item

JSONValueBase to be added.

Clear()

Clears all array items and brings count to 0.

Declaration
public void Clear()

Contains(JsonValue)

Checks if a JSONValue item exits in array.

Declaration
public bool Contains(JsonValue item)
Parameters
Type Name Description
JsonValue item

Item to be found.

Returns
Type Description
System.Boolean

True, if exits.

Implements
IJsonArray.Contains(JsonValue)

Contains(JsonValueBase)

Checks if a JsonValueBase item exits in array.

Declaration
public bool Contains(JsonValueBase item)
Parameters
Type Name Description
JsonValueBase item

Item to be found.

Returns
Type Description
System.Boolean

True, if exits.

CopyTo(JsonValueBase[], Int32)

Copies items from provided array starting from a particular array index.

Declaration
public void CopyTo(JsonValueBase[] array, int arrayIndex)
Parameters
Type Name Description
JsonValueBase[] array

Array from which the items have to be copied.

System.Int32 arrayIndex

Starting index of the array from which to start copying.

Equals(Object)

Checks if an object is equal to this instance of JSONArray.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

An object of the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.

Returns
Type Description
System.Boolean

An object of the ultimate base class of all classes in the .NET Framework.

Overrides
System.Object.Equals(System.Object)

GetEnumerator()

Returns an enumerator that iterates through JSONArray items.

Declaration
public IEnumerator<JsonValueBase> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<JsonValueBase>

Enumerator that iterates through JSONArray items.

Remove(JsonValue)

Removes JSONValue item from array.

Declaration
public bool Remove(JsonValue item)
Parameters
Type Name Description
JsonValue item

Item to be removed.

Returns
Type Description
System.Boolean

True, if item exists and is removed successfully.

Implements
IJsonArray.Remove(JsonValue)

Remove(JsonValueBase)

Removes JsonValueBase item from array.

Declaration
public bool Remove(JsonValueBase item)
Parameters
Type Name Description
JsonValueBase item

Item to be removed.

Returns
Type Description
System.Boolean

True, if item exists and is removed successfully.

ToString()

Returns JSONArray in string representation.

Declaration
public override string ToString()
Returns
Type Description
System.String

JSONArray in string representation.

Overrides
System.Object.ToString()

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Community
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top