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
For the end user BSON is like JSON but with additional types, if we were to create a library for working with directlry with BSON, should it mostly mimic this library extending it with suppored BSON types? (And then implement similar codecs library).
I'm not sure, this library was driven by the fact we can use the FFI to manipulate a representation of JSON without the need to convert it into PureScript values directly. I don't know if there's a way to do with that with BSON, but I suspect not - JSON is kinda privileged since it's synonymous with JS literals to a large degree.
You could work with the EJSON representation perhaps. You could build that on top of this without having to redefine everything from scratch then, or probably just skip introducing an abstraction for it at all, and just deal with it in the codec layer.
You could work with the EJSON representation perhaps. You could build that on top of this without having to redefine everything from scratch then, or probably just skip introducing an abstraction for it at all, and just deal with it in the codec layer.
Right, I was thinking about using EJSON as the intermediate format. The thing that pushed me away is that when using mongodb nodejs driver it requires serialization/deserialization steps from/to JS Objects (BSON.Document) that the driver works with. Though maybe, considering that purescript's encoding/decoding layer approach already assumes overheads this is not drastical to be worried about even in the general case?
Mongodb uses BSON for storing and representation of the data. https://www.mongodb.com/resources/basics/json-and-bson
For the end user BSON is like JSON but with additional types, if we were to create a library for working with directlry with BSON, should it mostly mimic this library extending it with suppored BSON types? (And then implement similar codecs library).
@garyb interesting to hear your thoughts on this.
The text was updated successfully, but these errors were encountered: