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
Default
Gets the JSON:API media type without any extensions.
public static readonly JsonApiMediaType Default
Field Value
RelaxedAtomicOperations
Gets the JSON:API media type with the "atomic-operations" extension.
public static readonly JsonApiMediaType RelaxedAtomicOperations
Field Value
Properties
Extensions
public IReadOnlySet<JsonApiMediaTypeExtension> Extensions { get; }
Property Value
Methods
Equals(JsonApiMediaType?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(JsonApiMediaType? other)
Parameters
other
JsonApiMediaTypeAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? other)
Parameters
other
object
Returns
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.