Updated the page delivery function to drupal_json_output