src/BaseValidator.php
public static function createFromJSON($json)
    {
        $object = json_decode($json);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \Exception(
                'JSON parse had errors - ' . json_last_error_msg()
            );
        }

        return static::createFromObject($object);
    }
public static function createFromJSON($json)
    {
        $object = json_decode($json);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \Exception(
                'JSON parse had errors - ' . json_last_error_msg()
            );
        }

        return static::createFromObject($object);
    }
public static function createFromJSON ( $ json ) { $ object = json_decode ( $ json ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new \ Exception ( 'JSON parse had errors - ' . json_last_error_msg ( ) ) ; } return static :: createFromObject ( $ object ) ; }
Create validator from validation object encoded as json object
@param  string $json Validation json encoded object
@return BaseValidator
@throws \Exception when JSON sting is not well formed
Create validator from validation object encoded as json object