You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,15 +66,17 @@ there may be breaking changes such as those highlighted in the [Flurl upgrade do
66
66
-`Newtonsoft.Json` is still fully supported but requires explicitly referencing the `FlurlGraphQL.Newtonsoft` library also available on Nuget.
67
67
- To then enable `Newtonsoft.Json` processing you need to either:
68
68
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()))...`
70
71
- 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)
71
73
2. Or initialize it at the request level using the `.UseGraphQLNewtonsoftJson(...)` extension method available in ``FlurlGraphQL.Newtonsoft``.
72
74
- 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+.
75
77
- 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`.
78
80
79
81
80
82
## Performance with System.Text.Json vs Newtonsoft.Json
0 commit comments