protected function encodeJsonSerializable(JsonSerializable $action_result, ResponseInterface $response, $status = 200)
    {
        return $response->write(json_encode($action_result))->withStatus($status);
    }