protected function encodeScalar($action_result, ResponseInterface $response, $status = 200)
    {
        return $response->write(json_encode($action_result))->withStatus($status);
    }
protected function encodeScalar($action_result, ResponseInterface $response, $status = 200)
    {
        return $response->write(json_encode($action_result))->withStatus($status);
    }
protected function encodeScalar ( $ action_result , ResponseInterface $ response , $ status = 200 ) { return $ response -> write ( json_encode ( $ action_result ) ) -> withStatus ( $ status ) ; }
Encode scalar value, with status 200.

@param  mixed             $action_result
@param  ResponseInterface $response
@param  int               $status
@return ResponseInterface
Encode scalar value with status 200 .