Why did you pull the `encode_json` out of the block?