Skip to content

Commit 10c7537

Browse files
committed
Merge branch 'master' of https://github.com/SphtKr/JSONAPI.NET
2 parents 100edc3 + d3e3241 commit 10c7537

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

JSONAPI/Json/JsonApiFormatter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ protected void Serialize(object value, Stream writeStream, JsonWriter writer, Js
151151

152152
if (this.CanWriteTypeAsPrimitive(prop.PropertyType))
153153
{
154+
if (prop.GetCustomAttributes().Any(attr => attr is JsonIgnoreAttribute))
155+
continue;
156+
154157
// numbers, strings, dates...
155158
writer.WritePropertyName(FormatPropertyName(prop.Name));
156159
serializer.Serialize(writer, prop.GetValue(value, null));

0 commit comments

Comments
 (0)