You are here

function drupal_json_encode in Drupal Remote Dashboard Server 6

2 calls to drupal_json_encode()
drd_server_error in ./drd_server.module
Prepare an error message for returning to the XMLRPC caller.
drd_server_result in ./drd_server.module
Prepare the result for returning it to the XMLRPC caller.

File

./drd_server.module, line 164

Code

function drupal_json_encode($var) {

  // json_encode() does not escape <, > and &, so we do it with str_replace().
  return str_replace(array(
    '<',
    '>',
    '&',
  ), array(
    '\\u003c',
    '\\u003e',
    '\\u0026',
  ), json_encode($var));
}