Skip to content

Commit 48e60c7

Browse files
authored
Update README.md
1 parent 3e42185 commit 48e60c7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,17 @@ there may be breaking changes such as those highlighted in the [Flurl upgrade do
6666
- `Newtonsoft.Json` is still fully supported but requires explicitly referencing the `FlurlGraphQL.Newtonsoft` library also available on Nuget.
6767
- To then enable `Newtonsoft.Json` processing you need to either:
6868
1. Initialize your global Flurl settings and/or clients with the out-of-the-box Flurl `NewtonsoftJsonSerializer` via Flurl Global or Request level Configuration.
69-
- Flurl Global Config Example: `clientOrRequest.Settings.JsonSerializer = new NewtonsoftJsonSerializer(new JsonSerializerSettings())`
69+
- Flurl Global Config Example: `FlurlHttp.Clients.UseNewtonsoft();`
70+
- Flurl Request or Client level Example: `clientOrRequest.WithSettigns(settings => settings.JsonSerializer = new NewtonsoftJsonSerializer(new JsonSerializerSettings()))...`
7071
- Doing this will automatically implement Newtonsoft processing for any/all GraphQL requests as the defautl also.
72+
- See Flurl docs for more info: [Flurl.Http.Newtonsoft](https://github.com/tmenier/Flurl/tree/dev/src/Flurl.Http.Newtonsoft#flurlhttpnewtonsoft)
7173
2. Or initialize it at the request level using the `.UseGraphQLNewtonsoftJson(...)` extension method available in ``FlurlGraphQL.Newtonsoft``.
7274
- The Json processing can always be customized/overridden at the request level for any specific GraphQL Request to use either
73-
System.Text.Json (via `.UseGraphQLSystemTextJson()`) or Newtonsoft.Json via (`.UseGraphQLNewtonsoftJson()`).
74-
- Dynamics are now only supported when using Newtonsoft.Json
75+
`System.Text.Json` (via `.UseGraphQLSystemTextJson()`) or `Newtonsoft.Json` via (`.UseGraphQLNewtonsoftJson()`).
76+
- Dynamics are now only supported when using `Newtonsoft.Json` which is consistent with Flurl v4+.
7577
- Retrieving the Raw Json responses now have dedicated APIs due to the different Json object models that each Json processing library uses.
76-
- If using System.Text.Json then you must now use the `.ReceiveGraphQLRawSystemTextJsonResponse()` method which returns a `JsonObject`.
77-
- If using Newtonsoft.Json then you must now use the `.ReceiveGraphQLRawNewtonsoftJsonResponse()` method which returns a `JObject`.
78+
- If using `System.Text.Json` then you must now use the `.ReceiveGraphQLRawSystemTextJsonResponse()` method which returns a `JsonObject`.
79+
- If using `Newtonsoft.Json` then you must now use the `.ReceiveGraphQLRawNewtonsoftJsonResponse()` method which returns a `JObject`.
7880

7981

8082
## Performance with System.Text.Json vs Newtonsoft.Json

0 commit comments

Comments
 (0)