Solved

Your Module Adds a New Controller Class Which Will Return

Question 36

Multiple Choice

Your module adds a new controller class which will return a JSON response. What will be the return type of the execute method?


A) You should implement a new API endpoint instead of returning JSON from a controller
B) The string value of \Zend_Json::encode() The string value of \Zend_Json::encode()
C) An instance of \Magento\Framework\Controller\Result\Json An instance of \Magento\Framework\Controller\Result\Json
D) No return needed, an object that can be converted to JSON must be set as the Response body

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions