Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilchert authored Apr 26, 2024
1 parent 2d3e941 commit df985df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ But in this case only serialization is available because JSON does not contain t

# Nullable reference type support
STJ has build in support of [`required`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/required) properties, but it just check, that value exists in JSON on deserialization and does not prevent setting `null` to none nullable properties. Fluent Api can configure `JsonSerializerOptions` to respect NRT annotations on fields and properties. Internally it uses [JsonPropertyInfo.Set](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.serialization.metadata.jsonpropertyinfo.set) property and reduces deserialization performance.
STJ will implement full NRT support in [.net9](https://github.com/dotnet/runtime/issues/100144)

```C#
builder.RespectNullableReferenceType();
Expand Down Expand Up @@ -259,4 +260,4 @@ enum A
Output:
```JS
["f",null,"third",8]
```
```

0 comments on commit df985df

Please sign in to comment.