-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type Mismatch when parsing received JSON #17
Comments
Hi @michaleibl I've updated You can find it here: https://raw2.github.com/timhall/Excel-REST/parse-numbers/src/RestHelpers.bas |
Hey @timhall, I fixed it the same way and it worked fine. |
Cool, thanks for raising this issue |
No problem. Thanks for working on this project ;) 2014-02-06 Tim Hall notifications@github.com:
|
Hello, I am using GitHub's VBA-JSON parsing tool (jsonconverter.bas) to parse a Json file. When I try to capture the value of one of the elements in the Json file through this line I get a mismatch error. MsgBox Json("ProvderContractAPI")("provContractHeader")("provContract")("recoveryDeadlinePeriod") I'm expecting to receive the value of recoveryDeadlinePeriod which is nested in the former elements. Thoughts? Thank you. |
The received JSON contained "Amount":14.6000000000, which was correctly parsed and given to CDbl for conversion. But it threw the mentioned error. I see a problem in usage of CDbl for converting the string to double because it's locale-dependent (my locale has ',' as decimal separator, which is of course nonsence to use in JSON). Using the Val for conversion solves this issue.
The text was updated successfully, but these errors were encountered: