Class JsonApiDocument
Represents a JSON API Document returned from a JSON API REST endpoint.
Inheritance
System.Object
JsonApiDocument
Implements
System.ICloneable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Subsembly.Json.dll
Syntax
public class JsonApiDocument : JsonObject, ICloneable
Constructors
JsonApiDocument(IJsonApiObjectFactory)
Declaration
public JsonApiDocument(IJsonApiObjectFactory aObjectFactory)
Parameters
Type |
Name |
Description |
IJsonApiObjectFactory |
aObjectFactory |
Optional object factory that will be used the create the resource objects that may
be contained in this document. If this is null , then a plain
JsonObject will be used for resource objects.
|
Properties
DataAsArray
Provides the JSON API document data as a JSON array.
Declaration
public JsonApiResourceObject[] DataAsArray { get; }
Property Value
DataAsObject
If the JSON API document data is represented as single JSON object, then this
property provides that object.
Declaration
public JsonApiResourceObject DataAsObject { get; }
Property Value
DataCount
Returns the number of resource objects provided through the "data" field.
Declaration
public int DataCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Errors
Declaration
public JsonApiErrorObjects Errors { get; }
Property Value
Included
Declaration
public JsonApiResourceObjects Included { get; }
Property Value
JsonApi
Declaration
public JsonApiVersionObject JsonApi { get; }
Property Value
Declaration
public JsonObject Meta { get; }
Property Value
Version
Provides the JSON API version from the JsonApi object.
Declaration
public string Version { get; }
Property Value
Type |
Description |
System.String |
|
Methods
FindIncluded(String, String)
Declaration
public JsonApiResourceObject FindIncluded(string sType, string sId)
Parameters
Type |
Name |
Description |
System.String |
sType |
|
System.String |
sId |
|
Returns
OnCreateChildArray(String)
Declaration
protected override JsonArray OnCreateChildArray(string sFieldName)
Parameters
Type |
Name |
Description |
System.String |
sFieldName |
|
Returns
Overrides
OnCreateChildObject(String)
Declaration
protected override JsonObject OnCreateChildObject(string sFieldName)
Parameters
Type |
Name |
Description |
System.String |
sFieldName |
|
Returns
Overrides
Implements
System.ICloneable