original_string: protected function isJsonString($data)
      {
          if (!is_string($data) && !is_null($data)) {
              return false;
          }
  
          // We json_encode here to see if there might be a json_last_error
          json_decode($data, true);
          if (json_last_error() !== JSON_ERROR_NONE) {
              return false;
          }
          return true;
      }
code: protected function isJsonString($data)
      {
          if (!is_string($data) && !is_null($data)) {
              return false;
          }
  
          // We json_encode here to see if there might be a json_last_error
          json_decode($data, true);
          if (json_last_error() !== JSON_ERROR_NONE) {
              return false;
          }
          return true;
      }
code_tokens: protected function isJsonString ( $ data ) { if ( ! is_string ( $ data ) && ! is_null ( $ data ) ) { return false ; } // We json_encode here to see if there might be a json_last_error json_decode ( $ data , true ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { return false ; } return true ; }
docstring: Attempt to check whether the provided string is json or not.
  
  @param string $data
  
  @return bool
docstring_tokens: Attempt to check whether the provided string is json or not .