Stupid JSON Question
Good Morning.
I want
alone in a richtextbox.
When I try this now, the richtextbox is always empty :
13 Replies
How are you deserializing the JSON?
Firstly, don't use
HttpWebRequest
Use HttpClient
oh, it's old?
yes
And not asynchronous
but HttpWebRequest is my Method Name
oof, I meant
WebRequest
anyway
Looks like you're trying to serialize JSON which has an array as its root element into a non-array object?wait, i have a idea
This is the converted JSON in C# (incomplete) I need to use RootObject rather than the News class
Looks like it, yep
This comes out because of the toString() or not?
well, it's an array
array doesn't have the ToString method overridden for display purposes
you need to turn it into a string yourself
string.Join(", ", news)
or somethingwell,
News
does not have a ToString defined could override the ToString I guess