Table of Contents

Class JsonApiMediaType

Namespace
JsonApiDotNetCore.Middleware
Assembly
JsonApiDotNetCore.dll

Represents the JSON:API media type (application/vnd.api+json) with an optional set of extensions.

[PublicAPI]
public sealed class JsonApiMediaType : IEquatable<JsonApiMediaType>
Inheritance
JsonApiMediaType
Implements
Inherited Members

Constructors

JsonApiMediaType(IEnumerable<JsonApiMediaTypeExtension>)

public JsonApiMediaType(IEnumerable<JsonApiMediaTypeExtension> extensions)

Parameters

extensions IEnumerable<JsonApiMediaTypeExtension>

JsonApiMediaType(IReadOnlySet<JsonApiMediaTypeExtension>)

public JsonApiMediaType(IReadOnlySet<JsonApiMediaTypeExtension> extensions)

Parameters

extensions IReadOnlySet<JsonApiMediaTypeExtension>

Fields

AtomicOperations

Gets the JSON:API media type with the "https://jsonapi.org/ext/atomic" extension.

public static readonly JsonApiMediaType AtomicOperations

Field Value

JsonApiMediaType

Default

Gets the JSON:API media type without any extensions.

public static readonly JsonApiMediaType Default

Field Value

JsonApiMediaType

RelaxedAtomicOperations

Gets the JSON:API media type with the "atomic-operations" extension.

public static readonly JsonApiMediaType RelaxedAtomicOperations

Field Value

JsonApiMediaType

Properties

Extensions

public IReadOnlySet<JsonApiMediaTypeExtension> Extensions { get; }

Property Value

IReadOnlySet<JsonApiMediaTypeExtension>

Methods

Equals(JsonApiMediaType?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(JsonApiMediaType? other)

Parameters

other JsonApiMediaType

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.