以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]企业微信 tostring (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=152505) |
-- 作者:JN_LC -- 发布时间:2020/7/13 23:16:00 -- [求助]企业微信 tostring 在企业微信中以下代码出现错误 Dim ul As String = "https://qyapi.weixin.qq.com/cgi-bin/department/create?access_token={0}" Dim hc As New HttpClient(CExp(ul,Functions.Execute("GetQYAccessToken"))) Dim jo As New JObject Dim r As Row=CurrentTable.Current jo("name") = r("name") jo("parentid") = r("parentid") jo("order") = r("order") hc.Content = jo.ToString() jo = JObject.Parse(hc.GetData) 错误应该出现在: jo("name") = r("name") jo("parentid") = r("parentid") jo("order") = r("order") 请问,怎样书写正确?
|
-- 作者:李孝春 -- 发布时间:2020/7/14 0:06:00 -- 参照对应看看 Dim dt As String = hc.GetData() Dim jo As JObject = JObject.Parse(dt) If jo("errcode") = "0" Then For Each jt As JToken In jo("external_contact") output.show(jt("external_userid")) output.show(jt("name")) Next Else MessageBox.Show(jo.ToString) End If
|
-- 作者:有点蓝 -- 发布时间:2020/7/14 9:02:00 -- 提示什么错误! jo("name") = cstr(r("name"))
|