public function RestfulFormatterJson::render in RESTful 7
Renders an array in the selected format.
Parameters
array $structured_data: The data prepared to be rendered as returned by \RestfulFormatterInterface::prepare().
Return value
string The body contents for the HTTP response.
Overrides RestfulFormatterInterface::render
File
- plugins/
formatter/ json/ RestfulFormatterJson.class.php, line 96 - Contains RestfulFormatterJson.
Class
- RestfulFormatterJson
- @file Contains RestfulFormatterJson.
Code
public function render(array $structured_data) {
return drupal_json_encode($structured_data);
}