You are here

function shurly_service_output_jsonp in ShURLy 7

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

Output JSON data

File

shurly_service/shurly_service.inc, line 102
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 . '(' . drupal_json_encode($data) . ');';
}