How to do json serialization using C# ?
Asked
Active
Viewed 153 times
0

Bo Persson
- 90,663
- 31
- 146
- 203

陳昱安
- 5
- 3
-
What is the isue? – Daniel Tran Dec 07 '17 at 04:25
-
change your tag? c -> c# – Vin Dec 07 '17 at 04:31
-
1Hey instead of posting image of code you can put the particular code. – Dilip Dec 07 '17 at 04:32
-
you can check how i do this in razor. it may help https://stackoverflow.com/questions/47610061/cannot-get-json-data-with-ajax-in-razor-pages/47620690#47620690 – Neville Nazerane Dec 07 '17 at 05:10
-
1By using newtonsoft.json.dll we can easily parse JSON – Clinton Prakash Dec 07 '17 at 05:15
1 Answers
0
You can use this code to serialize your object
var serialized = JsonConvert.SerializeObject(*Your object*);
You have to download the Newtonsoft library from here

Stephen Kennedy
- 20,585
- 22
- 95
- 108

Monish Koyott
- 374
- 1
- 4
- 20