You are here

function shurly_service_output_jsonp in ShURLy 8

Same name and namespace in other branches
  1. 6 shurly_service/shurly_service.inc \shurly_service_output_jsonp()
  2. 7 shurly_service/shurly_service.inc \shurly_service_output_jsonp()

Output JSON data.

File

shurly_service/shurly_service.inc, line 111
Link general search functionalities to services module.

Code

function shurly_service_output_jsonp($data, $input) {
  $func = $input['func'] ? $input['func'] : 'urlData';

  // Send the header.
  drupal_json_output();
  print $func . '(' . Json::encode($data) . ');';
}