-
Notifications
You must be signed in to change notification settings - Fork 3
content-specific json.api models #34
Copy link
Copy link
Open
Labels
Description
Relationship Data properties may contain a single ResourceIdentifier or an array of ResourceIdentifiers, based on the type of relationship. To support this, Data is currently a JToken. This is not ideal, as it requires a lot of checks on Data.TokenType for Object or Array.
A far better solution would be an IRelationship or abstract base class, with a custom JsonConverter for that type, that switches deserialization based on TokenType.
The same approach should apply to Resource and other types that have newtonsoft.json types.
Reactions are currently unavailable