❔ Do I need a model to serialize a json async?
My http response message is a big random json that I just want to convert to a string. The JsonSerializer.SerializeAsync() requires me to pass a model as argument. I can't provide a model because I don't know what the response will be.
I'm more curious about why a model is required than the solution honestly
9 Replies
I'm confused. What objects are holding your data?
What exactly is "a big random data"?
well the data is in a HttpResponseMessage
And what does the HttpResponseMessage's content contain?
some json strings
It can only contain 1 string
jesus, am I this stupid? I can just directly print the string from the request, no?
That's kinda what I'm asking 😛
I forgot the data was inside httpresponseMessage
thank you
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.