Skip to content
C++ JavaScript Shell
Find file
Pull request Compare This branch is 7 commits behind collectivemedia:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
avro-cpp @ e2c70f5

node-avro: Avro serialization format support for Node.js

This project aims to create a library for reading and writing Avro-serialized data in Node.js applications.

It is currently basically functional, but not battle-tested in production yet.

Install on Debian/Ubuntu

In your Node project directory:

apt-get install cmake libboost-dev libboost-filesystem-dev libboost-system-dev libboost-program-options-dev
git clone git://
cd node-avro
cd ..
npm install node-avro

cmake -version should be at least 2.8.9-rc1, we had problems with 2.8.0.



var avro = require("avro");
var schema = avro.prepareSchema("string");
var buffer = schema.encode("foo");
var value = schema.decode(buffer);

avro.prepareSchema(<object>) -> <schema>

Creates a prepared schema object from a JS schema object, as defined in the Avro spec.

<schema>.encode(<value>) -> <buffer>

The encode method of a schema object takes a JS value and returns a binary buffer containing the Avro-encoded representation of the value.

<schema>.decode(<buffer>) -> <value>

The decode method of a schema object takes a binary buffer containing an Avro-encoded value and returns the decoded JS value.


node-avro is licensed under the MIT license.


Node-avro is created by Manuel Simoni ( for Collective Media, Inc.


Node-avro currently depends on a fork of the Avro C++ library. We are working on upstreaming our changes.

Something went wrong with that request. Please try again.