added a note about returning an object when using a JSON response

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes (symfony/symfony#7846)
| Applies to    | all
| Fixed tickets | n/a