private function hasError($json): ?string
    {
        if (!isset($json['table_name'])) {
            return "missing [table_name] property in JSON payload";
        }
        if (!isset($json['group_id'])) {
            return "missing [group_id] property in JSON payload";
        }
        if (!isset($json['criteria'])) {
            return "missing [criteria] property in JSON payload";
        }
        if (!isset($json['criteria']['version']) || $json['criteria']['version'] !== '1') {
            return "missing or invalid [criteria.version] property in JSON payload";
        }
        return null;
    }
private function hasError($json): ?string
    {
        if (!isset($json['table_name'])) {
            return "missing [table_name] property in JSON payload";
        }
        if (!isset($json['group_id'])) {
            return "missing [group_id] property in JSON payload";
        }
        if (!isset($json['criteria'])) {
            return "missing [criteria] property in JSON payload";
        }
        if (!isset($json['criteria']['version']) || $json['criteria']['version'] !== '1') {
            return "missing or invalid [criteria.version] property in JSON payload";
        }
        return null;
    }
private function hasError ( $ json ) : ? string { if ( ! isset ( $ json [ 'table_name' ] ) ) { return "missing [table_name] property in JSON payload" ; } if ( ! isset ( $ json [ 'group_id' ] ) ) { return "missing [group_id] property in JSON payload" ; } if ( ! isset ( $ json [ 'criteria' ] ) ) { return "missing [criteria] property in JSON payload" ; } if ( ! isset ( $ json [ 'criteria' ] [ 'version' ] ) || $ json [ 'criteria' ] [ 'version' ] !== '1' ) { return "missing or invalid [criteria.version] property in JSON payload" ; } return null ; }
hasError returns string error message if json is not valid or null otherwise.

@param $json
@return null|string
hasError returns string error message if json is not valid or null otherwise .