Skip to content

Commit 1e756b3

Browse files
committed
Add extJSON conversion and errors to BSON migration guide
1 parent 56dccd9 commit 1e756b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Guides/BSON.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ let uuid = try UUID(from: myBSONBinary) // old
348348
let uuid = try myBSONBinary.toUUID() // new
349349
```
350350

351+
#### Extended JSON Conversion
352+
Previously, `Document`/`BSONDocument` had computed properties, `extendedJSON` and `canonicalExtendedJSON`, to support converting to those formats. To better signify that these methods involve a non-constant time conversion, we've converted these properties to methods named `toExtendedJSONString()` and `toCanonicalExtendedJSONString()`, respectively.
353+
354+
#### Errors
355+
Previously, the BSON library used the same types of errors as the driver. As of 1.0.0, the BSON library has its own set of errors. Please see the [error handling guide](https://github.com/mongodb/mongo-swift-driver/blob/master/Guides/Error-Handling.md) for more details.
356+
351357
### Migrating from the 0.0.1-0.1.3 API to the 0.2.0 BSON API
352358
In version 0.2.0 of `MongoSwift`, the public API for using BSON values was changed dramatically. This section will describe the process for migrating from the old API (BSON API v1) to this new one (BSON API v2).
353359
#### Overview of BSON API v1

0 commit comments

Comments
 (0)