See More

using System.Collections.Generic; using Newtonsoft.Json.Linq; namespace JSONAPI.Documents { ///

/// Default implementation of IResourceObject /// public class ResourceObject : IResourceObject { public string Type { get; private set; } public string Id { get; private set; } public IDictionary Attributes { get; private set; } public IDictionary Relationships { get; private set; } public ILink SelfLink { get; private set; } public IMetadata Metadata { get; private set; } /// /// Creates a ResourceObject /// public ResourceObject(string type, string id, IDictionary attributes = null, IDictionary relationships = null, ILink selfLink = null, IMetadata metadata = null) { Type = type; Id = id; Attributes = attributes ?? new Dictionary(); Relationships = relationships ?? new Dictionary(); SelfLink = selfLink; Metadata = metadata; } } }