src/Concerns/MakesHttpRequests.php
public function seeJson(array $data = null, $negate = false)
    {
        if (is_null($data)) {
            $this->assertJson(
                $this->response->getContent(), "JSON was not returned from [{$this->currentUri}]."
            );

            return $this;
        }

        try {
            return $this->seeJsonEquals($data);
        } catch (ExpectationFailedException $e) {
            return $this->seeJsonContains($data, $negate);
        }
    }
public function seeJson(array $data = null, $negate = false)
    {
        if (is_null($data)) {
            $this->assertJson(
                $this->response->getContent(), "JSON was not returned from [{$this->currentUri}]."
            );

            return $this;
        }

        try {
            return $this->seeJsonEquals($data);
        } catch (ExpectationFailedException $e) {
            return $this->seeJsonContains($data, $negate);
        }
    }
public function seeJson ( array $ data = null , $ negate = false ) { if ( is_null ( $ data ) ) { $ this -> assertJson ( $ this -> response -> getContent ( ) , "JSON was not returned from [{$this->currentUri}]." ) ; return $ this ; } try { return $ this -> seeJsonEquals ( $ data ) ; } catch ( ExpectationFailedException $ e ) { return $ this -> seeJsonContains ( $ data , $ negate ) ; } }
Assert that the response contains JSON.

@param  array|null  $data
@param  bool  $negate
@return $this
Assert that the response contains JSON .