I've been a very happy user of JsonConverter for a while now - this is really useful. My usage is with Github REST API to get back information about repos, releases, tags, etc.
Today, I got tripped up trying to use it for Github repo TOPICS. I've set all the Accept headers, etc. correctly and am getting back the information in a variable called 'strResult'. However, I'm not getting the exact value of the topic itself.
Postman shows me the format as:
{
"names": [
"training",
"testing",
"github",
"tortoisegit"
]
}
This seems not to be the standard format of {"values":[{"a":1,"b":2,"c": 3},...]} I don't know if that is the problem.
My VBA script starts off with:
Set topics_Json = JsonConverter.ParseJson(strResult)
When I try:
For Each topic In topics_Json
Msgbox topic("names")
Next topic
This throws a mismatch error.
If I replace the second line with 'Msgbox topic', it simply returns the string "names" but not the value. I suspect this may have to do something with objects vs. array ({ vs [) but I'm no expert.
I've been a very happy user of JsonConverter for a while now - this is really useful. My usage is with Github REST API to get back information about repos, releases, tags, etc.
Today, I got tripped up trying to use it for Github repo TOPICS. I've set all the Accept headers, etc. correctly and am getting back the information in a variable called 'strResult'. However, I'm not getting the exact value of the topic itself.
Postman shows me the format as: { "names": [ "training", "testing", "github", "tortoisegit" ] } This seems not to be the standard format of {"values":[{"a":1,"b":2,"c": 3},...]} I don't know if that is the problem.
My VBA script starts off with:
Set topics_Json = JsonConverter.ParseJson(strResult)
When I try: For Each topic In topics_Json Msgbox topic("names") Next topic
This throws a mismatch error.
If I replace the second line with 'Msgbox topic', it simply returns the string "names" but not the value. I suspect this may have to do something with objects vs. array ({ vs [) but I'm no expert.
Thanks for any help!