Some utilities for dealing with BSON and JSON in C