public function toJSON($JSON_PRETTY_PRINT = false)
    {
        $object = $this->toObject();

        /*foreach ($object as $key => &$attribute) {
            //Check if any of attributes is an instance of BaseValidator
            if (is_object($attribute) && is_a($attribute, BaseValidator::class)) {
                $attribute = $attribute->toObject();
            }
        }*/

        return json_encode(
            $object,
            ($JSON_PRETTY_PRINT ? JSON_PRETTY_PRINT : 0)
        );
    }