Closed WesSouza closed 4 years ago
Hello @WesSouza, which version of BSON are you using? The readme still describes the old 5.x version of BSON. The latest version of BSON which is used in MongoDB is 7.x.
@Joannis I have installed this using Swift Package Manager, so I'm using version 7.0.23.
Is there a place I can find references on how to encode and decode data? I'm using this for a personal project to decode binary WebSocket messages.
Would also be super happy to contribute to an update to README if I can find more data about it.
If you're looking for Codable, be sure to use BSONEncoder
and BSONDecoder
.
I've just updated the docs, but feel free to make a PR for any info you might find helpful.
I am trying to use this package on a new project, and I'm unable to access any values on a created Document while following the same method as the README states.
The compiler is unable to use the value:
If I add a breakpoint and observe the value using lldb, it does have a debugger output, so the data exists:
Did this stop working on newer versions of Swift?