fn send_json(stream: &mut TcpStream, status: u16, value: &Value) -> Result<()>
Sends a JSON response with the given status code.