Reputation: 11
I'm new in Symfony2, and i'm studing it about. But i've observed that Symfony sometimes uses json for some data, and in other situations as routing uses yaml filetype. What is the difference in that framework? why use one instead of another? They are very similar in the syntax, why not only one (json or yml)? i need a very simple explanation. Thank you!
Upvotes: 1
Views: 480
Reputation: 782
There's no difference between the different format. Fabien Potencier talk about this at the Laracon 2013 here
Upvotes: 1
Reputation: 6787
I'd say that in this scenario YAML is normally used for internal configuration files due to its readability, while JSON is mostly used for APIs and ajax requests due to the simplicity of format and the client side language used (JavaScript).
However, this is not a rule. You could use both formats for the opposite purposes.
Upvotes: 2