void PlainJobDocument::JobAction::LoadFromJobDocument()

in source/jobs/JobDocument.cpp [234:273]


void PlainJobDocument::JobAction::LoadFromJobDocument(const JsonView &json)
{
    const char *jsonKey = JSON_KEY_NAME;
    if (json.ValueExists(jsonKey) && json.GetJsonObject(jsonKey).IsString())
    {
        name = json.GetString(jsonKey).c_str();
    }

    jsonKey = JSON_KEY_TYPE;
    if (json.ValueExists(jsonKey) && json.GetJsonObject(jsonKey).IsString())
    {
        type = json.GetString(jsonKey).c_str();
    }

    jsonKey = JSON_KEY_INPUT;
    if (json.ValueExists(jsonKey))
    {
        ActionInput temp;
        temp.LoadFromJobDocument(json.GetJsonObject(jsonKey));
        input = temp;
    }

    jsonKey = JSON_KEY_RUNASUSER;
    if (json.ValueExists(jsonKey) && json.GetJsonObject(jsonKey).IsString())
    {
        runAsUser = json.GetString(jsonKey).c_str();
    }

    jsonKey = JSON_KEY_ALLOWSTDERR;
    if (json.ValueExists(jsonKey) && json.GetJsonObject(jsonKey).IsIntegerType())
    {
        allowStdErr = json.GetInteger(jsonKey);
    }

    jsonKey = JSON_KEY_IGNORESTEPFAILURE;
    if (json.ValueExists(jsonKey) && json.GetJsonObject(jsonKey).IsString())
    {
        ignoreStepFailure = json.GetString(jsonKey) == "true";
    }
}