• Stars
    star
    9
  • Rank 1,878,257 (Top 39 %)
  • Language
    Julia
  • License
    Other
  • Created over 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

libbson bindings for the Julia programming language

LibBSON.jl

Build Status 0.6 Status Coverage Status

libbson bindings for The Julia Language

License

This software is licensed under the simplified BSD license; see the file LICENSE.md for details.

Example Usage

using LibBSON

bsonObject = BSONObject(Dict(
    "null" => nothing,
    "bool" => true,
    "int" => 42,
    "double" => 3.141,
    "string" => "Hello, Jérôme",
    "oid" => BSONOID(),
    "minkey" => :minkey,
    "maxkey" => :maxkey,
      "binaryData" => Array{UInt8}(20),
    "array" => Any[5.41, false]
    ))
println(bsonObject)
println(bsonObject["string"])
for (k, v) in bsonObject
    println("$k => $v")
end
bsonArray = BSONArray(Any[
    "one",
    Dict("key" => 6.7)
    ])
for e in bsonArray
    println(e)
end

Please refer to the unit tests in test/runtests.jl for more examples of usage.

Contributing

Contributions are welcome! Please fork on github.com and submit a pull request if you have a contribution you think is worthwhile!