Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lucsoft/web_bson
- Owner: lucsoft
- License: bsd-3-clause
- Created: 2021-12-14T13:12:24.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-25T08:44:08.000Z (6 months ago)
- Last Synced: 2024-10-16T18:27:37.661Z (21 days ago)
- Topics: bson, deno, json
- Language: JavaScript
- Homepage:
- Size: 3.63 MB
- Stars: 11
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)