Create Three Symfony Back Ends - Part #30 - The Context in API Platform
In the previous video we looked at the Entry Point. This was the first of the two differences to routing than you would find with a 'typical' Symfony project. In this video we will look at the second difference, the Context. Available Formats Out of the box we can work with raw JSON, JSON-LD (JSON for Linking Data), and JSON-HAL. HTML is also available for the docs. JSON-LD is the preferred format. Raw JSON support is only considered 'experimental'. There are no guarantees given that using raw JSON will work moving forwards. That's an interesting point, in my opinion. However, you can implement any format you like. If you'd like to know more, the docs here are great. Given that JSON-LD is the preferred format, this is the format we will work in when consuming our API Platform setup. This means our Behat tests will be in need of some, ahem, -minor- major tweaking.