Writing a full JSON Serializer in 100 lines of C# code
来源:互联网 发布:c语言怎么输出五角星 编辑:程序博客网 时间:2024/06/05 17:57
In my previous article I talked about the hunt for a good JSON parser/serializer. For my current project I only needed a serializer to generate JSON from any .NET object, so for now it’s a bit overkill to use a full blown JSON library.
After looking at the specs for JSON, I figured it couldn’t be too hard to write a JSON serializer in C#. Not only was it not that hard, it was very short too: about 100 lines of code (well, 110 without the empty lines).
The serializer can handle any regular data type, including DateTime (for which there is no standard in JSON).
Here it is: (feel free to use it for anything you like
http://www.dotnetkicks.com/ajax/Writing_a_full_JSON_Serializer_in_100_lines_of_C_code
http://www.blog.activa.be/2007/08/12/WritingAFullJSONSerializerIn100LinesOfCCode.aspx
- Writing a full JSON Serializer in 100 lines of C# code
- 40 lines of java code Map convert to JSON
- Docker implemented in 100 lines of bash
- Commenting out a range of lines in VIM
- Look into "A Neural Network in 11 lines of Python"
- linux: Count Lines of Code
- How to add a Login, Roles and Profile system to an ASP.NET 2.0 app in only 24 lines of code
- delete specific lines in a set of files in a folder
- CodeForces 543A-Writing Code
- codeforce 543A Writing Code
- Detecting Application Memory leaks in Unmanaged C++ with 4 lines of code:
- A good code base of Microsoft C#
- Writing a letter of recommendation
- 20-lines AR in OpenCV [w/code]
- Zen Coding — a new way of writing HTML and CSS code
- Codeforces Round #302 (Div. 2) A.Set of Strings&B.Sea and Islands&C.Writing Code
- Writing A Threadpool in Rus
- Writing A Threadpool in Rus
- Linux CentOS 5 Server: YUM Repository to Install Zend Optimizer
- 数字的由来
- js判断根据锚点显示不同的内容
- 一组数字读懂中国
- 几个名词: RIA, AIR, Apollo, WPF, Silverlight 以及WPF/Silverlight /Flash的比较
- Writing a full JSON Serializer in 100 lines of C# code
- 计算机专业就业方向
- vmware ubuntu 共享文件夹
- shell中行到一个月的最后一天 echo $(cal)|awk '{print$(NF)}'
- 水晶报表9.2的部署不能使用默认的msm文件。需要另指定
- 帮助CSDN网友完成的一个程序
- 井字游戏chess of XO谁能帮我完成啊...THX
- 新春快乐,虎年大吉!
- websphere tomcat下,filter的不同表现