Skip to content

Commit 141bdd2

Browse files
author
Chris Santero
committed
maintain old CanWriteTypeAsPrimitive API
1 parent a77df81 commit 141bdd2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

JSONAPI/Json/JsonApiFormatter.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ public override bool CanWriteType(Type type)
5353
return true;
5454
}
5555

56+
public bool CanWriteTypeAsPrimitive(Type objectType)
57+
{
58+
return objectType.CanWriteAsJsonApiAttribute();
59+
}
60+
5661
#region Serialization
5762

5863
public override Task WriteToStreamAsync(System.Type type, object value, Stream writeStream, System.Net.Http.HttpContent content, System.Net.TransportContext transportContext)

0 commit comments

Comments
 (0)