func tableToMessage(L *lua.LState, t *lua.LTable) sarif.Message { msg := sarif.Message{} msg.Version = tableGetString(t, "sarif") msg.Id = tableGetString(t, "id") msg.Action = tableGetString(t, "action") msg.Source = tableGetString(t, "src") msg.Destination = tableGetString(t, "dest") msg.CorrId = tableGetString(t, "corr") msg.Text = tableGetString(t, "text") p := luareflect.DecodeToBasic(t.RawGetH(lua.LString("p"))) msg.EncodePayload(p) return msg }