Enable passing an encode/decode sub for bson. Need to standardize this method