Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lucsoft/web_bson

web_bson builds opon mongodb/js-bson
https://github.com/lucsoft/web_bson

bson deno json

Last synced: 14 days ago
JSON representation

web_bson builds opon mongodb/js-bson

Awesome Lists containing this project

README

        

# web_bson

web_bson builds opon [js-bson](https://github.com/mongodb/js-bson/). Bson is
short for "Binary JSON" and is the binary-encoded serialization of JSON-like
documents. You can learn more about it in
[the specification](http://bsonspec.org).

### Deno & Web

A simple example of how to use web_bson:

```js
import { deserialize, Long, serialize } from "https://deno.land/x/web_bson";

// Serialize a document
const doc = { long: Long.fromNumber(100) };
const data = serialize(doc);
console.log("data:", data);

// Deserialize the resulting Buffer
const doc_2 = deserialize(data);
console.log("doc_2:", doc_2);
```

## Documentation

The Documentation can be found under
[doc.deno.land](https://doc.deno.land/https://deno.land/x/web_bson/mod.ts)