original_string: public static function jsonEncode($data)
      {
          $json = json_encode($data);
          // if json_encode failed
          if ($json === false) {
              self::jsonLastError();
          }
          return $json;
      }
code: public static function jsonEncode($data)
      {
          $json = json_encode($data);
          // if json_encode failed
          if ($json === false) {
              self::jsonLastError();
          }
          return $json;
      }
code_tokens: public static function jsonEncode ( $ data ) { $ json = json_encode ( $ data ) ; // if json_encode failed if ( $ json === false ) { self :: jsonLastError ( ) ; } return $ json ; }
docstring: Encode as JSON and throw error if fails
  
  @param mixed $data - data to encode
  
  @static
  
  @return string - json string
  @throws \Exception if json decode fails with message about why
docstring_tokens: Encode as JSON and throw error if fails