.Net serialize object to custom JSON (sort of) format

This question already has an answer here:

  • Json.Net - Serialize property name without quotes 1 answer

  • Not the most graceful way to do it, but you could always consider using JSON.NET, serializing your object to a JSON string, then performing string manipulation on the output to get it into the format you desire. I'm sure you could write up a quick method that will take in a JSON string and spit it out in a REST service compatible format. That way you don't exactly have to write your own serializer.

    链接地址: http://www.djcxy.com/p/14216.html

    上一篇: 针对json字符串python运行测试

    下一篇: .Net将对象序列化为自定义JSON(排序)格式