Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/web_bson/src/bson.ts>EJSON.serialize

web_bson is a fork from mongodb/js-bson
Go to Latest
function EJSON.serialize
import { EJSON } from "https://deno.land/x/web_bson@v0.2.4/src/bson.ts";
const { serialize } = EJSON;

Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.

Parameters

value: SerializableTypes
  • The object to serialize
optional
options: Options
  • Optional settings passed to the stringify function

Returns

Document