Class JsonInstance
Represents a JSON instance from a structural data source.
Namespace: Cuemon.Runtime.Serialization
Assembly: Cuemon.Runtime.dll
Syntax
public abstract class JsonInstance
Constructors
| Improve this DocJsonInstance(String, Object, Int32)
Initializes a new instance of the JsonInstance class.
Declaration
protected JsonInstance(string name, object value, int nodeNumber)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the JSON object. |
System.Object | value | The value of the JSON object. |
System.Int32 | nodeNumber | The logical node number of the JSON object placement in the originating structural data source. |
Properties
| Improve this DocInstances
Gets the children of the current JsonInstance object.
Declaration
public JsonInstanceCollection Instances { get; }
Property Value
Type | Description |
---|---|
JsonInstanceCollection |
Name
Gets the name of the JSON object.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
NodeNumber
Gets the logical node number of the JSON object placement in the originating structural data source.
Declaration
protected int NodeNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Parent
Gets or sets the parent of this JsonInstance object.
Declaration
public JsonInstance Parent { get; set; }
Property Value
Type | Description |
---|---|
JsonInstance | The parent of this JsonInstance object. |
Value
Gets the value of the JSON object.
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this DocGetSignature()
Computes and returns a MD5 signature of the following properties: Name, Value and NodeNumber.
Declaration
public virtual string GetSignature()
Returns
Type | Description |
---|---|
System.String | A MD5 signature of the following properties: Name, Value and NodeNumber. |
IsPartOfArray()
Determines whether this JsonInstance should be part of an array.
Declaration
public virtual bool IsPartOfArray()
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
Because of the complexity when generating JSON, this property should be treated as a hint-only. Additional logic is assumed necessary.
WriteEndArray()
Determines whether this JsonInstance is in a state, where a EndArray should be written.
Declaration
public virtual bool WriteEndArray()
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
Because of the complexity when generating JSON, this property should be treated as a hint-only. Additional logic is assumed necessary.
WriteStartArray()
Determines whether this JsonInstance is in a state, where a BeginArray should be written.
Declaration
public virtual bool WriteStartArray()
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
Because of the complexity when generating JSON, this property should be treated as a hint-only. Additional logic is assumed necessary.
WriteValueSeperator()
Determines whether this JsonInstance is in a state, where a ValueSeperator should be written.
Declaration
public virtual bool WriteValueSeperator()
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
Because of the complexity when generating JSON, this property should be treated as a hint-only. Additional logic is assumed necessary.