public function prettify($json, $flags = null, $indent = "\t", $is_json=null)
    {
        if (!isset($is_json)) {
            $is_json = $this->isJson($json);
        }

        if (!$is_json) {
            return $this->process(json_encode($json, $flags), $indent);
        }

        return $this->process($json, $indent);
    }
public function prettify($json, $flags = null, $indent = "\t", $is_json=null)
    {
        if (!isset($is_json)) {
            $is_json = $this->isJson($json);
        }

        if (!$is_json) {
            return $this->process(json_encode($json, $flags), $indent);
        }

        return $this->process($json, $indent);
    }
public function prettify ( $ json , $ flags = null , $ indent = "\t" , $ is_json = null ) { if ( ! isset ( $ is_json ) ) { $ is_json = $ this -> isJson ( $ json ) ; } if ( ! $ is_json ) { return $ this -> process ( json_encode ( $ json , $ flags ) , $ indent ) ; } return $ this -> process ( $ json , $ indent ) ; }
Checks if input is string, if so, straight runs
process, else it encodes the input as json then
runs prettify.

@param  mixed  $json             The json string or object to prettify
@param  int    $flags            The flags to use in json encoding
@param  string $indent           The indentation character string
@param  bool   $is_json          Is the input already in JSON format?
@return string The prettified json
Checks if input is string if so straight runs process else it encodes the input as json then runs prettify .