}
if (json.has(DELEGATION_STATE)) {
query.taskDelegationState(DelegationState.valueOf(json.getString(DELEGATION_STATE)));
}
if (json.has(CANDIDATE_USER)) {
query.taskCandidateUser(json.getString(CANDIDATE_USER));
}
if (json.has(CANDIDATE_GROUP)) {
query.taskCandidateGroup(json.getString(CANDIDATE_GROUP));
}
if (json.has(CANDIDATE_GROUPS) && !json.has(CANDIDATE_USER) && !json.has(CANDIDATE_GROUP)) {