The JSON view
The Json view class
FOF30\View\DataView\Json is designed to create data-aware Views which result in downloadable JSON files.
This View class is simply an extension to the Raw view class. Everything described in the Raw view class still applies here. The Csv class adds a few features on top of what Raw can already do.
$this->useHypermedia boolean property tells FOF whether it should generate
application/json+hal documents with HAL support. The default is false, creating a plain JSON file with either a list of records (browse views) or an individual record (read views). You can set this in the constructor of your view class.
When HAL support is enabled, the MIME type reported is
application/json+hal. The resulting document will contain the
_links section with links to the pagination results for browse views. By default FOF does not include embedded documents (relations).
FOF supports JSONP out of the box for all Json views. You can pass the