bson_encode: wip