Json Serialization and DeSerialization of Dynamic Objects

preview_player
Показать описание

Please follow the same steps as mentioned below.

2. Add DLL to your project
3. Create Dynamic object or List
4. Perform Serialization using SerializeObject
5. Perform DeSerialization using Json String
6. Print Results.
Рекомендации по теме
Комментарии
Автор

I stumbled across this video and I'm so happy I did. I didn't know you could dynamically create an object like that. It is going to make some of my future projects so much easier as they will all involve grabbing large Json results and spitting them out somewhere else. And I wasn't looking forward to having to manually write classes to cater for the Json structures. Good job. My only critsism (and I know this is a couple of years old, so you might have done this) is that you could do with a better microphone, and also recording software which you can record your mouse cursor also.

GarethDoherty
Автор

could you please help me to deserialize xml file into dictionary which is coming as a request from some third party (it can be different product or external api) and write a generic method to generate response in dictionary format passing to that product or external api?

vinitasinha
Автор

I have dictionary and want to create dynamic object by accessing all keys as properyName.

KINONINOTalent
Автор

Thanks for the good explanation of expandoobject and json serialization / deserialization !
As you said at the end of the video, the "dynamic" expandoobject can't be "bound" to the Mvc GridView and you are looking for a solution. Did you find one ?

Thanks, LA Guy

wanderingsoul
Автор

Thanks for the good explanation of expandoobject and json serialization / deserialization ! I have tried the example which you explained I got the API response like "{\"firstname\":\"prasanthi\", \"lastname\":\"kota\"}" here slashes are adding when serializing the object.Could you tell me why slashes are adding when serializing the dynamic object and how to remove slashes without using regex pattern.

prasanthikota
Автор

Thanks Great video,
Question : can you create a web service which return JSON string as we add reference of that web service in our asp.net project thxxx

nayyarnayyar
Автор

Please suggest me my json giving me sometime array type response and sometimes object type please tell me how to handle

samrockings