Class JsonBase
Allows working with JsonObject
Inheritance
System.Object
JsonBase
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FastReport
Assembly: FastReport.OpenSource.dll
Syntax
public abstract class JsonBase
Properties
Count
Returns count of child object
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsArray
Returns true if this object is JsonArray
Declaration
public virtual bool IsArray { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsObject
Returns true if this object is JsonObject
Declaration
public virtual bool IsObject { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Returns child object for JsonArray
Declaration
public virtual object this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
System.Object |
Item[String]
Returns child object for JsonObject
Declaration
public virtual object this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Property Value
Type | Description |
---|---|
System.Object |
Keys
Returns list of JsonObject keys
Declaration
public virtual IEnumerable<string> Keys { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
ContainsKey(String)
returns true
Declaration
public virtual bool ContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Boolean |
FromString(String)
Pars json text string and return a new JsonBase Object
Declaration
public static JsonBase FromString(string jsonText)
Parameters
Type | Name | Description |
---|---|---|
System.String | jsonText |
Returns
Type | Description |
---|---|
JsonBase |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
WriteTo(StringBuilder, Int32)
Serialize this object to sb
Declaration
public abstract void WriteTo(StringBuilder sb, int indent)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | |
System.Int32 | indent | indent in space, 0 = without indent |