I am a novice with VBA and JSON and I have a project as part of my internship that will have to query a rest endpoint containing a collection of dictionaries in a JSON format. I’ve read as much as I can to try to understand how to parse that JSON into Excel, but I am getting confused and I am having trouble making things work.
I think the “Rest to Excel Library” and “Excel JSON conversion” pages seem to describe the process that relates to my task. I’ve downloaded “cDataSet.xlsm and read this other forum post started by Bill called “JSON to Excel with existing JSON file,” but I am still having trouble.
I’ve attached a sample JSON with the vba code bellow:
Dim dSet As New cDataSet, cb As New cBrowser, jo As New cJobject
dSet.populateJSON _jo.deSerialize(cb.httpGET("bellow.companywebsite.com:5000/food/components")).child("components"), Range("sheet1! $a$1")
Can this be a result of how the data in the JSON file is formatted?
I would love to learn more about vba and rest. Thank you very much for any insight!
Dim dSet As New cDataSet, cb As New cBrowser, jo As New cJobject, s as string
debug.print 'fetched', s
set jo = JSONparse(s)
debug.print 'parsed', jo.stringify