bson_encode: (wip)