-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing Empty List result in null instead of empty list #808
Comments
|
I tested it with different types for the array and for every other type i try e.g. int, string, bool. I still get null for the parsed list |
Try using https://github.com/tmenier/Flurl/blob/dev/src/Flurl.Http/Configuration/DefaultJsonSerializer.cs |
As a side-note, I would have guessed that using Newtonsoft + |
Yeah I tried GetStringAsync in the first place. |
My Code
Response JSON that i get:
{ "results" : [] }
Behaviour
When running my code i exptect that the empty array will be parsed to an empty list.
In the newest version Response.results is null.
In different 3.x.x Versions Response.results is still correctly parsed to an empty list
Things i tried
I tried different types for the List elements (Jobject, JSONObject, dynamic)
Different cases for the list property (results, Results)
The text was updated successfully, but these errors were encountered: