How to remove null value in json string
Hi I'm using the below class
Public List<string> name;
Public List<string> midname;
Once I serialize it I'm getting the following output like
{"name":[hari],"midname":null}
But I want my answer to be like this
{"name":[hari]}
It shouldn't display the class attribute that has null value and I'm using c# .net framework.
If you are using
|
参考地址:http://stackoverflow.com/questions/15574506/how-to-remove-null-value-in-json-string