Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit c4fc462

Browse files
committed
doc(readme): update readme for 4.0.0-rc1 release
1 parent 8901be1 commit c4fc462

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ string.
4141
**Example**
4242
```js
4343
const EJSON = require('mongodb-extjson');
44-
const text = '{"int32":{"$numberInt":"10"}}';
44+
const text = '{ "int32": { "$numberInt": "10" } }';
4545

4646
// prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } }
47-
console.log(EJSON.parse(text));
47+
console.log(EJSON.parse(text, { relaxed: false }));
4848

4949
// prints { int32: 10 }
50-
console.log(EJSON.parse(text, {strict: false}));
50+
console.log(EJSON.parse(text));
5151
```
5252
<a name="stringify"></a>
5353

@@ -72,10 +72,10 @@ const Int32 = require('mongodb').Int32;
7272
const doc = { int32: new Int32(10) };
7373

7474
// prints '{"int32":{"$numberInt":"10"}}'
75-
console.log(EJSON.stringify(doc));
75+
console.log(EJSON.stringify(doc, { relaxed: false }));
7676

7777
// prints '{"int32":10}'
78-
console.log(EJSON.stringify(doc, {relaxed: true}));
78+
console.log(EJSON.stringify(doc));
7979
```
8080
<a name="serialize"></a>
8181

0 commit comments

Comments
 (0)