original_string: protected function jsonify($data)
      {
          // JSON_NUMERIC_CHECK removes leading zeros
          // which is an issue in cases like postcode e.g. 00160
          // see https://bugs.php.net/bug.php?id=64695
          $json = json_encode($data);
  
          //catch JSON parsing error
          $error = RESTfulAPIError::get_json_error();
          if ($error !== false) {
              return new RESTfulAPIError(400, $error);
          }
  
          return $json;
      }
code: protected function jsonify($data)
      {
          // JSON_NUMERIC_CHECK removes leading zeros
          // which is an issue in cases like postcode e.g. 00160
          // see https://bugs.php.net/bug.php?id=64695
          $json = json_encode($data);
  
          //catch JSON parsing error
          $error = RESTfulAPIError::get_json_error();
          if ($error !== false) {
              return new RESTfulAPIError(400, $error);
          }
  
          return $json;
      }
code_tokens: protected function jsonify ( $ data ) { // JSON_NUMERIC_CHECK removes leading zeros // which is an issue in cases like postcode e.g. 00160 // see https://bugs.php.net/bug.php?id=64695 $ json = json_encode ( $ data ) ; //catch JSON parsing error $ error = RESTfulAPIError :: get_json_error ( ) ; if ( $ error !== false ) { return new RESTfulAPIError ( 400 , $ error ) ; } return $ json ; }
docstring: Convert data into a JSON string
  
  @param  mixed  $data Data to convert
  @return string       JSON data
docstring_tokens: Convert data into a JSON string