JSON.NET项目地址: http://json.codeplex.com/
JSON.NET 快速开始&API文档
简介
Json.NET makes working with JSON formatted data in .NET simple. Quickly read and write JSON using LINQ to JSON or serialize your .NET objects with a single method call using the JsonSerializer.
Json.NET使得在.NET中使用JSON格式的数据变得简单起来。使用LINQ to JSON或者通过调用JsonSerializer的一个方法序列化你的.NET对象来快速读/写JSON.
Features
特点:
- Flexible JSON serializer to convert .NET objects to JSON and back again 灵活的JSON序列化器用于在.NET对象与JSON之间来回转换。
- LINQ to JSON for reading and writing JSON LINQ to JSON用于读写JSON。
- Writes indented, easy to read JSON 缩排书写,使得JSON易读
- Convert JSON to and from XML JSON与XML相互转化
- Supports Silverlight and the Compact Framework 支持Silverlight和.NET框架Compact版
The JSON serializer is a good choice when the JSON you are reading or writing maps closely to a .NET class. The serializer automatically reads and writes JSON for the class.
当你读写的JSON与.NET类相映射时,JSON序列化器是个很好的选择。序列化器会自动为类读写JSON.
For situations where you are only interested in getting values from JSON, don't have a class to serialize or deserialize to, or the JSON is radically different from your class and you need to manually read and write from your objects then LINQ to JSON is what you should use. LINQ to JSON allows you to easily read, create and modify JSON in .NET.
对于你只是对从JSON获取值感兴趣的情况,不需要有一个类来序列化或反序列化,或者JSON根本就和你的类不同,需要你手动读写你的对象,这时LINQ to JSON应该是你的选择。LINQ to JSON使你容易的在.NET里读取、创建和修改JSON。
History 历史
Json.NET grew out of projects I was working on in late 2005 involving JavaScript, AJAX and .NET. At the time there were no libraries for working with JavaScript in .NET so I began to grow my own.
Json.NET从我2005年晚些时候的项目里发展而来,项目涉及Javascript,AJAX和.NET。当时.NET里没有可用的库用来和javascript交互,于是我自己搞了个。
Starting out as a couple of static methods for escaping JavaScript strings, Json.NET evolved as features were added. To add support for reading JSON a major refactor was required and Json.NET will split into the three major classes it still uses today, JsonReader, JsonWriter and JsonSerializer.
一开始只有2个静态的方法用来转义Javascript字符串,后来随着新功能增加Json.NET进化了。为了增加对JSON读取的支持,需要一个主要的重构工具,Json.NET将要分成3个主要的类,直到今天还这样用着:JsonReader,JsonWriter和JsonSerializer。
Json.NET was first released in June 2006. Since then Json.NET has been downloaded thousands of times by developers and is used in a number of major projects open source projects including MonoRail, Castle Project's MVC web framework, and Mono, an open source implementation of the .NET framework.
Json.NET第一次发布是在2006年的六月份。从那时起,Json.NET一直被无数开发人员下载以及被用在一系列主流开源项目中,包括:MonoRail,Castle项目的MVC web框架和Mono(.NET框架的一个开源实现)。
~ James Newton-King
Donate 捐助
Json.NET is a free open source project that I have developed in my personal time.
Json.NET是一个免费的开源项目,我一直都是在业余时间来开发。
I really appreciate your feedback and support for Json.NET and its future development.
我真的感激你们的反馈信息以及对Json.NET和它将来的发展的大力支持。