You are here

public function RestfulFormatterHalJson::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

1 method overrides RestfulFormatterHalJson::render()
RestfulFormatterHalXml::render in modules/restful_example/plugins/formatter/RestfulFormatterHalXml.class.php
Renders an array in the selected format.

File

plugins/formatter/hal_json/RestfulFormatterHalJson.class.php, line 196
Contains RestfulFormatterHalJson.

Class

RestfulFormatterHalJson
@file Contains RestfulFormatterHalJson.

Code

public function render(array $structured_data) {
  return drupal_json_encode($structured_data);
}