So I downloaded the module, imported into the project, enabled the reference library & edited the project to use the functions in this module.
Like the previous code I was using, this new code also runs into problems when trying to read certain JSON values. To be specific - If the datatype of the returned value is a non-scalar value such as an array or a dictionary/collection, the code runs into an error. (The previous code returned a useless string of "[object]". This one triggers a 450 error.)
On the previous code I added code that managed to work around this read issue. Relevant extract below:
On the JsonConverter code I am not finding it so easy. I edited the main code to this:
I can convert these values to a 1d array using the function below:
But if the value I am trying to read from the JSON is in the format of a 2d array (Well a Dictionary if you like. The value is a 2 column 2d array of (sub-)fields and their associated (sub-)values) then I cant read it.
I am not an expert on JSONs but I'm puzzled that none of the VBA JSON code I have tried supports reading non-scalar values from JSONs?
What scares me is that if the code can't handle reading these values then it wont support writing these either.
Bookmarks