secomind / cyanide

BSON documents in Elixir language

Home Page:bsonspec.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cyanide

Cyanide is a BSON library for Elixir.

Installation

The package can be installed by adding cyanide to your list of dependencies in mix.exs:

def deps do
  [
    {:cyanide, "~> 1.0"}
  ]
end

Usage

Cyanide.encode(%{"value" => 42})
#=> {:ok, <<16, 0, 0, 0, 16, 118, 97, 108, 117, 101, 0, 42, 0, 0, 0, 0>>}

Cyanide.decode(<<16, 0, 0, 0, 16, 118, 97, 108, 117, 101, 0, 42, 0, 0, 0, 0>>)
#=> {:ok, %{"value" => 42}}

About

BSON documents in Elixir language

bsonspec.org

License:Apache License 2.0


Languages

Language:Elixir 100.0%