Skip to content

Commit 6fe6e76

Browse files
Merge pull request restsharp#761 from alex-mtx/patch-1
Update readme.txt
2 parents 3d07db9 + 4e239ea commit 6fe6e76

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

readme.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ it you may remove it from your installed packages.
88
There is one breaking change: the default Json*Serializer* is no longer
99
compatible with Json.NET. To use Json.NET for serialization, copy the code
1010
from https://github.com/restsharp/RestSharp/blob/86b31f9adf049d7fb821de8279154f41a17b36f7/RestSharp/Serializers/JsonSerializer.cs
11-
and register it with your client:
11+
and register it with your request:
1212

13-
var client = new RestClient();
14-
client.JsonSerializer = new YourCustomSerializer();
13+
var request = new RestRequest();
14+
request.JsonSerializer = new Shared.JsonSerializer();
15+
16+
then you can use it in a client:
17+
18+
var client = new RestClient();
19+
client.Post(request);
1520

1621
The default Json*Deserializer* is mostly compatible, but it does not support
1722
all features which Json.NET has (like the ability to support a custom [JsonConverter]

0 commit comments

Comments
 (0)