How to Convert JSON string to C# Object

preview_player
Показать описание
In this tutorial, we will see how to convert a json string into a C# .net Object.
We will see ,

1.Simple Nested JSON
2. Complex JSON
3. Dynamic Type

#.Net Object to Json
Рекомендации по теме
Комментарии
Автор

Awesome tutorial. I have learnt quite a lot about JSON in C#. This helped me to understand much better in this topic.

kopilkaiser
Автор

Could you please show how to work on complex json using dynamic type

neerajchouksey
Автор

Tysm for this. Please also show how to use dynamic object for complex json

ai
Автор

Thanks dude well explained.ur vidio helped me alot

trinadhit
Автор

Thanks.. Reallly awsome tutorial. specially for the complex type of data, I was not able to get appropiate solution for the issue i was facing, but your tutorial made it all clear. Thanks Again. :)

shaikhshaji
Автор

I have doubt, first need created notepad file or into c# .json ?

naseestech
Автор

Hi
I want to login using the android app want to send data like user id and pass to the server like “abc.com” in json format

Then deserialize that json to c# obj
And want to respond appropriately

Is it the same way can i do as you shown in this video ??
Please guide me.

nishasharma
Автор

getting this exception while creating List object

System.TypeLoadException: 'Could not load type from assembly 'System.Web, Version=4.0.0.0, Culture=neutral,

please suggest

ennkaybee
Автор

I am getting invalid Json Primitive and my application crashes I am using web form and api, 5 days before it was working fine, but today when I tried to run without changing any code I am getting invalid json pritive error and some cake.php, please help

apptest
Автор

Thanks, but, can you give me the source?, i need all the codige, please, because, if i introduce your data, in the run show me that some datas failed.

salvadorchilaca
Автор

i am not able to add reference of system.web.script, cant find it. I am working on vs 2015 console application .

kumarkirti
Автор

good


sir i need this data show in UI please make a video thanx

stevejones
Автор

the name 'Response' does not exist in the current context. How to solve this?

matys
Автор

make YouTube to use dynamic object for complex json

BirendraKumar-jhof
Автор

DO yo ureally need to make a 24 min video just to convert a simple json string into C# object? smh

lesterllorca
Автор

hello, thank you for you video, i have just a question, i am a beginner with json data in unity. I have this json in my console unity, i want to access position, what's wrong with my code please ?
after deserialization, i did this :
JSONNode position =
and i converted the sting x to float lke this:

string x = position["x"].Value;
string y = position["y"].Value;
string z = position["z"].Value;

X = float.Parse(x);
Y= float.Parse(y);
z= float.Parse(z);


Vector3 newPosition = new Vector3(X, Y, Z);
= newPosition;

but i didn't get the value of x on the vector in the inspector
{
"cmd": "data",
"streams": [
{
"name": "usb",
"objects": [
{
"name": "face",
"mono": {
"position": {
"x": "0.030760",
"y": "0.071577",
"z": "0.928508"
}
}
}
]
}
]
}

salmidjedjiga
Автор

Could you do the same thing in a url that seems to return in json but it returns in string?

Obs: The text below is not a json! (vb)

{"user_info":{"username":""
"password":""
"message":""
"auth":1
"status":"Active"
"exp_date":"1622940449"
"is_trial":"0"
"active_cons":"0"
"created_at":"1620262049"
"max_connections":"3"
"allowed_output_formats":["m3u8", "ts", "rtmp"]}

viic