Struct SingleOrManyData<T>
- Namespace
- JsonApiDotNetCore.Serialization.Objects
- Assembly
- JsonApiDotNetCore.dll
Represents the value of the "data" element, which is either null, a single object or an array of objects. Add SingleOrManyDataConverterFactory to Converters to properly roundtrip.
[PublicAPI]
public readonly struct SingleOrManyData<T> where T : ResourceIdentifierObject, new()
Type Parameters
T
The type of elements being wrapped, typically ResourceIdentifierObject or ResourceObject.
- Inherited Members
Constructors
SingleOrManyData(object?)
public SingleOrManyData(object? value)
Parameters
value
object
Properties
IsAssigned
[JsonIgnore]
public bool IsAssigned { get; }
Property Value
ManyValue
[JsonIgnore]
public IList<T>? ManyValue { get; }
Property Value
- IList<T>
SingleValue
[JsonIgnore]
public T? SingleValue { get; }
Property Value
- T
Value
public object? Value { get; }