JSON parsing format?

Marcus_Dyer June 30, 2020

So I successfully have authenticated everything and am in the process of parsing the JSON to put it in cells  but my issue is I am only able to do "key" and "ID". How do I parse the other JSON data? 

 

1 answer

0 votes
Michael Raj July 30, 2020

Hi @Marcus_Dyer ,

it depends on how do you request issues - by "search" or directly by "issue".

Search URL: [...].com/rest/api/latest/search?jql=[...]
Issue URL: [...].com/rest/api/latest/issue/[...]

If "search", I use something like this:

Sheets("issues").Cells(Sheet_Row, 9) = Json("issues")(Json_Item)("fields")("status")("name")

If "issue" there is only one item so the code would like this:

Sheets("issues").Cells(Sheet_Row, 9) = Json("issues")("fields")("status")("name")

Of course you have to have default "fields" setting or set "fields=status"

You can always check the hierarchy in Firefox - it shows nice formatted JSON responses.

 

I've focused on "status" but other fields can be done in similar way. Always check the parent and child nodes in nicely formatted JSON for example in Firefox. It helps a lot!

 

Best,
Michael

Suggest an answer

Log in or Sign up to answer