Answer the question
In order to leave comments, you need to log in
How to get all data from json c#?
Hello. I get data in Json. There are also arrays and lines and Inty.
Is there a way to display all data?
For example. In the data array we have data: price, color, size.
The output should output: data: price-50r | color-red | size-xs.
By class, I understand how to deserialize. I don't understand without them.
Answer the question
In order to leave comments, you need to log in
Watch what you're doing. A.S.P.? winforms? WPF? Xamarin? What version of .NET?
And so, there is Json.NET (Newtonsoft.Json, 555 million downloads).
It can be like this:
string json = @"{""key1"":""value1"",""key2"":""value2""}";
var values = JsonConvert.DeserializeObject<Dictionary<string, dynamic>>(json);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question