Model/Apiconnector/Rest.php
public function toJSON($pretty = false)
    {
        if (!$pretty) {
            return json_encode($this->expose());
        } else {
            return $this->prettyPrint(json_encode($this->expose()));
        }
    }
public function toJSON($pretty = false)
    {
        if (!$pretty) {
            return json_encode($this->expose());
        } else {
            return $this->prettyPrint(json_encode($this->expose()));
        }
    }
public function toJSON ( $ pretty = false ) { if ( ! $ pretty ) { return json_encode ( $ this -> expose ( ) ) ; } else { return $ this -> prettyPrint ( json_encode ( $ this -> expose ( ) ) ) ; } }
Returns the object as JSON.

@param bool $pretty

@return string
Returns the object as JSON .