original_string: public function appendJson($data)
      {
          $jsonData = json_decode($data, true);
  
          if (is_null($jsonData)) {
              $this->_errorsList['json_decode'] = 'Json cannot be decoded.';
              $this->_hasErrors = true;
              return $this;
          }
  
          $this->appendArray($jsonData);
  
          if ($this->_objectCreation) {
              return $this->_afterAppendDataToNewObject();
          }
          return $this;
      }
code: public function appendJson($data)
      {
          $jsonData = json_decode($data, true);
  
          if (is_null($jsonData)) {
              $this->_errorsList['json_decode'] = 'Json cannot be decoded.';
              $this->_hasErrors = true;
              return $this;
          }
  
          $this->appendArray($jsonData);
  
          if ($this->_objectCreation) {
              return $this->_afterAppendDataToNewObject();
          }
          return $this;
      }
code_tokens: public function appendJson ( $ data ) { $ jsonData = json_decode ( $ data , true ) ; if ( is_null ( $ jsonData ) ) { $ this -> _errorsList [ 'json_decode' ] = 'Json cannot be decoded.' ; $ this -> _hasErrors = true ; return $ this ; } $ this -> appendArray ( $ jsonData ) ; if ( $ this -> _objectCreation ) { return $ this -> _afterAppendDataToNewObject ( ) ; } return $ this ; }
docstring: apply given json data as object data
  
  @param string $data
  @return $this
docstring_tokens: apply given json data as object data