Hello, I got wrong number arguments or invalid property assignment when used JsonConverter.ParseJson.
I have Sub routines here. In both of them i am using JsonConverter.ParseJson. In first Sub GetIssueIDs it is failing at line " Set jsonText = JsonConverter.ParseJson(response)" with error mentioned in title., where as same works in 2nd SUb., which means i imported all necessary modules correctly.
what is incorrectly being done here.
Sub GetIssueIDs()
Dim http As Object
Dim jsonText As Object
Dim item As Object
Dim url As String
Dim response As String
url = "***********/rest/api/3/search/jql?jql=project%20%3D%20RTAQSR%0AAND%20issuetype%20IN%20standardIssueTypes()%0AAND%20sprint%20%3D%2033879%0AAND%20type%20IN%20standardIssueTypes()%0AORDER%20BY%20created%20DESC%2C%20assignee%20ASC"
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", url, False
http.setRequestHeader "Accept", "application/json"
http.setRequestHeader "Content-Type", "application/json"
http.setRequestHeader "User-Agent", "Mozilla/5.0"
http.setRequestHeader "Authorization", "Basic ***"
http.Send
If http.Status = 200 Then
response = http.responseText
MsgBox response & "asdfasd"
Sheet1.Range("A1").Value = response
Set jsonText = JsonConverter.ParseJson(response)
MsgBox jsonText
' Loop through issues array
For Each item In jsonText("issues")
Debug.Print "ID: " & item("id")
Next item
' Other fields
Debug.Print "Next Token: " & jsonText("nextPageToken")
Debug.Print "Is Last: " & jsonText("isLast")
Else
Debug.Print "Error: " & http.Status
End If
End Sub
Sub TestJson()
Dim json As Object
Dim response As String
response = "{""issues"":[{""id"":""123""}]}"
Set json = JsonConverter.ParseJson(response)
MsgBox json("issues")(1)("id")
End Sub
Hello, I got wrong number arguments or invalid property assignment when used JsonConverter.ParseJson.
I have Sub routines here. In both of them i am using JsonConverter.ParseJson. In first Sub GetIssueIDs it is failing at line " Set jsonText = JsonConverter.ParseJson(response)" with error mentioned in title., where as same works in 2nd SUb., which means i imported all necessary modules correctly.
what is incorrectly being done here.