You are here

function shurly_service_output_jsonp in ShURLy 6

Same name and namespace in other branches
  1. 8 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 141
Link general search functionalities to services module.

Code

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

  // send the header
  drupal_json();
  print $func . '(' . drupal_to_js($data) . ');';
}