摘要:
1、使用NuGet安装Newtonsoft.Json。2、创建需要序列化的类。public class Person{public string Name{get;set;}public int Age{get;set;}}var obj=new Person();3、var result = Js... 阅读全文
摘要:
使用NuGet安装Nancy和直接引用源码项目存在一些差异,如序列化,授权验证问题。如果引用源码的话,自定义JsonSerializer,如下:注意,需要使用NuGet安装Newtonsoft.Json public class CustomJsonNetSerializer : JsonSeria... 阅读全文