Class JsonApiDocument
Represents a JSON API Document returned from a JSON API REST endpoint.
Inheritance
JsonApiDocument
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
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
Methods
FindIncluded(string, string)
Declaration
public JsonApiResourceObject FindIncluded(string sType, string sId)
Parameters
Returns
OnCreateChildArray(string)
Declaration
protected override JsonArray OnCreateChildArray(string sFieldName)
Parameters
Type |
Name |
Description |
string |
sFieldName |
|
Returns
Overrides
OnCreateChildObject(string)
Declaration
protected override JsonObject OnCreateChildObject(string sFieldName)
Parameters
Type |
Name |
Description |
string |
sFieldName |
|
Returns
Overrides
Implements