FOF30\Model\DataModel::toJson PHP Method

toJson() public method

Returns the record's data as a JSON string
public toJson ( boolean $prettyPrint = false ) : string
$prettyPrint boolean Should I format the JSON for pretty printing
return string
    public function toJson($prettyPrint = false)
    {
        if (defined('JSON_PRETTY_PRINT')) {
            $options = $prettyPrint ? JSON_PRETTY_PRINT : 0;
        } else {
            $options = 0;
        }
        return json_encode($this->recordData, $options);
    }