Implemented drupal json functions