Skip to content

Commit

Permalink
Update readme.txt
Browse files Browse the repository at this point in the history
The current description is misleading.
  • Loading branch information
alex-mtx committed Oct 5, 2015
1 parent 0ef81fd commit 4e239ea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ it you may remove it from your installed packages.
There is one breaking change: the default Json*Serializer* is no longer
compatible with Json.NET. To use Json.NET for serialization, copy the code
from https://github.com/restsharp/RestSharp/blob/86b31f9adf049d7fb821de8279154f41a17b36f7/RestSharp/Serializers/JsonSerializer.cs
and register it with your client:
and register it with your request:

var client = new RestClient();
client.JsonSerializer = new YourCustomSerializer();
var request = new RestRequest();
request.JsonSerializer = new Shared.JsonSerializer();

then you can use it in a client:

var client = new RestClient();
client.Post(request);

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

0 comments on commit 4e239ea

Please sign in to comment.