Skip to content

Commit 5dba590

Browse files
committed
Updated the docs about using JSON serializer options
1 parent 61ab1aa commit 5dba590

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/serialization.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ property of the response. Read more about it in the [Error Handling](error-handl
1111

1212
The default JSON serializer uses `System.Text.Json`, which is a part of .NET since .NET 6. For earlier versions, it is added as a dependency. There are also a few serializers provided as additional packages.
1313

14+
By default, RestSharp will use `JsonSerializerDefaults.Web` configuration. If necessary, you can specify your own options:
15+
16+
```csharp
17+
client.UseSystemTextJson(new JsonSerializerOptions {...});
18+
```
19+
1420
## XML
1521

1622
The default XML serializer is `DotNetXmlSerializer`, which uses `System.Xml.Serialization` library from .NET.

0 commit comments

Comments
 (0)