src/BaseValidator.php
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)
        );
    }
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)
        );
    }
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 ) ) ; }
Export validator to json encoded string
@param boolean $JSON_PRETTY_PRINT *[Optional]*
@return string
Export validator to json encoded string