Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

Suppose you created a new format - called dino_json - which is like JSON, except that, for each resource in the response, you add a dinosaur key set to the dinosaur you feel most represents that resource.

To set this up, you add the following to your config:

# config/packages/api_platform.yaml
api_platform:
    formats:
        jsonld: [ 'application/ld+json' ]
        json: [ 'application/json' ]
        html: [ 'text/html' ]
        dino_json: [ 'application/dino+json' ]

Would this work? If not, what is missing?

userVoice