BSON 的 Java 开发包 ebson
- 授权协议: MIT
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/kohanyirobert/ebson
- 软件文档: https://github.com/kohanyirobert/ebson
软件介绍
ebson 是一个可扩展的 BSON 文档 Java 开发包。
Maven:
<dependency> <groupId>com.github.kohanyirobert</groupId> <artifactId>ebson</artifactId> <version>...</version> </dependency>
示例代码:
// create documents to serialize
BsonDocument document = BsonDocuments.of("key", new Date());
// grab a little-endian byte buffer
ByteBuffer buffer = ByteBuffer.allocate(32).order(ByteOrder.LITTLE_ENDIAN);
// use the documents utility class to write the document into the buffer
BsonDocuments.writeTo(buffer, document);
// use the serialized data
buffer.flip();
