天天看点

Newtonsoft.Json序列化和反序列之javascriptConvert.SerializeObject,DeserializeObject,JsonWriter,JsonReader

这里下载:http://www.newtonsoft.com/products/json/

安装:

   1.解压下载文件,得到Newtonsoft.Json.dll

   2.在项目中添加引用..

javascriptConvert.SerializeObject

 序列化和反序列在.net项目中: 

javascriptConvert.DeserializeObject

读取JSON

结果显示:

<col>

TokenType

ValueType

Value

StartArray

null

String

System.String

JSON!

Integer

System.Int32

1

Boolean

System.Boolean

True

StartObject

PropertyName

property

value

EndObject

EndArray

这里会打印出: ​<code>​['JSON!',1,true,{property:'value'}]​</code>​.

龙腾一族至尊龙骑

继续阅读