BSON for Jackson
- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/michel-kraemer/bson4jackson
- 软件文档: http://www.michel-kraemer.com/binary-json-with-bson4jackson
软件介绍
BSON for Jackson 顾名思义,是 Jackson 的扩展,实现对 BSON 格式的支持。
Maven
<dependencies> <dependency> <groupId>de.undercouch</groupId> <artifactId>bson4jackson</artifactId> <version>2.5.0</version> </dependency> </dependencies>
示例代码:
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import com.fasterxml.jackson.databind.ObjectMapper;
import de.undercouch.bson4jackson.BsonFactory;
public class ObjectMapperSample {
public static void main(String[] args) throws Exception {
//create dummy POJO
Person bob = new Person();
bob.setName("Bob");
//serialize data
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectMapper mapper = new ObjectMapper(new BsonFactory());
mapper.writeValue(baos, bob);
//deserialize data
ByteArrayInputStream bais = new ByteArrayInputStream(
baos.toByteArray());
Person clone_of_bob = mapper.readValue(bais, Person.class);
assert bob.getName().equals(clone_of_bob.getName());
}
}
Node.js硬实战:115个核心技巧
【美】Alex R. Young、【美】Marc Harter / 承竹、慕陶、邱娟、达峰 / 电子工业出版社 / 2017-1 / 109.9
《Node.js 硬实战:115 个核心技巧》是一本面向实战的Node.js 开发进阶指南。作为资深专家,《Node.js 硬实战:115 个核心技巧》作者独辟蹊径,将着眼点放在Node.js 的核心模块和网络应用,通过精心组织的丰富实例,向读者充分展示了Node.js 强大的并发处理能力,读者从中可真正掌握Node 的核心基础与高级技巧。《Node.js 硬实战:115 个核心技巧》总共有三部分......一起来看看 《Node.js硬实战:115个核心技巧》 这本书的介绍吧!
