This is a created article in which the information may have evolved or changed.
The Jsoniter is a fast and flexible JSON parser that offers both Java and Go two versions.
The recently released version of 0.9.8 provides a detailed review of performance against Jackson and Protobuf: Https://github.com/json-itera .... The principle of performance optimization will be published in the Infoq Chinese station recently, please look forward to.
It also provides a common PHP experience. In PHP, you just need to remember Json_decode, and what documents can be parsed. Now in Java, you can do the same.
Any any = Jsoniter.deserialize(input); // deserialize 返回 "Any",实际的解析是延迟在读取时才做的any.get("items", '*', "name", 0); // 抽取所有 items 的第一个 nameany.get("size").toLong(); // 不管是 "100" 还是 100 ,都给转成 long 类型,就像弱类型一样any.bindTo(Order.class); // 把 JSON 绑定到对象for (Any element : any) {} // 遍历集合, Any 实现了 iterable 接口
Project website: http://jsoniter.com/index.cn ....