You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| value | <code>object</code> || The value to convert to extended JSON |
122
-
|[replacer]| <code>function</code> \| <code>array</code> || A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string |
123
-
|[space]| <code>string</code> \| <code>number</code> || A String or Number object that's used to insert white space into the output JSON string for readability purposes. |
| value | <code>object</code> || The value to convert to extended JSON|
135
+
|[replacer]| <code>function</code> \| <code>array</code> || A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string |
136
+
|[space]| <code>string</code> \| <code>number</code> || A String or Number object that's used to insert white space into the output JSON string for readability purposes.|
| ejson | <code>object</code> | The Extended JSON object to deserialize|
162
177
|[options]| <code>object</code> | Optional settings passed to the parse method |
163
178
164
179
Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types
@@ -194,7 +209,7 @@ BSON vendors the required polyfills for `TextEncoder`, `TextDecoder`, `atob`, `b
194
209
npm install --save react-native-get-random-values
195
210
```
196
211
197
-
The following snippet should be placed at the top of the entrypoint (by default this is the root `index.js` file) for React Native projects using the BSON library. These lines must be placed for any code that imports `BSON`.
212
+
The following snippet should be placed at the top of the entrypoint (by default this is the root `index.js` file) for React Native projects using the BSON library. These lines must be placed for any code that imports `BSON`.
198
213
199
214
```typescript
200
215
// Required Polyfills For ReactNative
@@ -211,7 +226,7 @@ This will cause React Native to import the `node_modules/bson/lib/bson.rn.cjs` b
211
226
212
227
### Technical Note about React Native module import
213
228
214
-
The `"exports"` definition in our `package.json` will result in BSON's CommonJS bundle being imported in a React Native project instead of the ES module bundle. Importing the CommonJS bundle is necessary because BSON's ES module bundle of BSON uses top-level await, which is not supported syntax in [React Native's runtime hermes](https://hermesengine.dev/).
229
+
The `"exports"` definition in our `package.json` will result in BSON's CommonJS bundle being imported in a React Native project instead of the ES module bundle. Importing the CommonJS bundle is necessary because BSON's ES module bundle of BSON uses top-level await, which is not supported syntax in [React Native's runtime hermes](https://hermesengine.dev/).
0 commit comments