Fluent-jsonC# 的 JSON 生成器和解析器
Fluent-json 是 C# 的 JSON 生成器和解析器,除了支持基本的 JSON 操作,还可以映射自定义类到 JSON 数据格式。这是一个线程安全的库,同时确保强类型安全。
示例代码:
JsonEncoder<Book> encoder = Json.EncoderFor<Book>(config => config .MapType<Book>(map => map .AllFields() // DateTime can't be encoded to native json. Conversion is required. .Field<DateTime>(field => field.pubDate, pubDate => pubDate .EncodeAs<string>(value => value.ToShortDateString()) ) // BookType can't be encoded either, let's convert it too. .Field<BookType>(field => field.type, type => type .EncodeAs<int>(value => (int)value) // Lets assume we would want to encode this field to a // different json field. .To("book_type") ) ) .MapType<Author>(map => map .AllFields() ) .UseTidy(true) ); Book book = new Book(); book.title = "Around the world in 80 days"; book.tags = new List<string> { "traveling", "adventure" }; book.pageCount = 342; book.pubDate = DateTime.Now; book.author = new Author(); book.author.forname = "Jules"; book.author.surname = "Verne"; string json = encoder.Encode(book);
评论
fastjsonJava 实现的 JSON 解析器和生成器
fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工
fastjsonJava 实现的 JSON 解析器和生成器
0
fastjsonJava 实现的 JSON 解析器和生成器
fastjson是一个性能很好的Java语言实现的JSON解析器和生成器,来自阿里巴巴的工程师开发。主要特点:快速FAST(比其它任何基于Java的解析器和生成器更快,包括jackson)强大(支持普
fastjsonJava 实现的 JSON 解析器和生成器
0
BeneJSONC 语言的 JSON 解析器
BeneJSON是一个C语言的JSON解析器,提供一个C++接口,主要特点:速度快、体积小,可容易集成到别的软件。
BeneJSONC 语言的 JSON 解析器
0
sjsonSymbian上的JSON解析器
SymbianJSON解析器——sjson,只需两个文件sjson.h,sjson.cpp。已经在项目开发中有广泛使用,运行稳健,中文支持良好。推荐给大家。需要了解如何上手的朋友,请阅读及运行test
sjsonSymbian上的JSON解析器
0