LibBSON wrapper for Crystal
-
Add the dependency to your
shard.yml
:dependencies: bson: github: washu/bson.cr
-
Run
shards install
require "bson"
example creation of a bson document
query = [
{"$match" => {"status" => "A"}},
{"$group" => {"_id" => "$cust_id", "total" => {"$sum" => "$amount"}}}]
bson_query = query.to_bson
.... you now have a valid bson object to use.
- Fork it (https://github.com/washu/bson.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Sal Scotto - creator and maintainer