Skip to content

Commit 0d9cdfa

Browse files
committed
update doc
[skip ci]
1 parent f883901 commit 0d9cdfa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,10 @@ The library uses System.Text.Json to serialize and deserialize json by default,
201201

202202
```cs
203203
var client = new SocketIO("http://localhost:11000/");
204-
var jsonSerializer = client.Serializer as SystemTextJsonSerializer;
205-
jsonSerializer.OptionsProvider = () => new JsonSerializerOptions
204+
client.Serializer = new SystemTextJsonSerializer(new JsonSerializerOptions
206205
{
207206
PropertyNameCaseInsensitive = true
208-
};
207+
});
209208
```
210209

211210
Of course you can also use Newtonsoft.Json library, for this, you need to install `SocketIO.Serializer.NewtonsoftJson`

0 commit comments

Comments
 (0)