Create Three Symfony Back Ends - Part #20 - XML, JSON, or Both? FOSRESTBundle
931 views
Feb 14, 2023
Towards the end of the previous video we saw that FOSRESTBundle comes with the concept of a View Layer. By using the View Layer we allow our front end / API consumer to send and receive data in a variety of formats: * json * xml As far as we as FOSRESTBundle integrators are concerned, so long as we wrap our data - entities, arrays, even Symfony's Form class - FOSRESTBundle can handle the process of serializing the data for us into JSON, or XML, or any other format we have configured. This is awesome. This is a solid example of how using FOSRESTBundle for your Symfony 4 JSON API is going to save you a bunch of time. But, also this won't just work right out of the box.