Harmonious Development with Symfony 6
JSON API Endpoint
Unlock this challenge
Login Register

Challenge 1 / 1

Suppose I have a simple controller that extends Symfony\Bundle\FrameworkBundle\Controller\AbstractController. This time, in one of its actions, I want to return a JSON response instead of HTML. What would the return statement look like?

Select your answer
Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.