pub fn encode_and_hash(value: &Value) -> Result<(Vec<u8>, ContentHash)>
Encode and content-hash in one step.