JSON-VBA Code



Here you can find the complete VBA source code that will permit you to handle JSON texts. This VBA source code is a result of dozens of hours of work and it represents approximatively 1.800 lines of code. We decided to offer it to the Community as Open Source code. […]

VBA complete Source Code to handle JSON strings


The JSON grammar is well defined, and, strictly speaking, leaves no room for interpretation. However, sometimes, it can come in handy to be a little forgiving. The alternative is that deserialization fails, and, that in order to make it work, you carefully need to correct all grammatical errors in the […]

VBA code: How Strictly The JSON Grammar Must Be Used



If you try to put the content of the JSON text into a variable of the type Dictionary, several things could go wrong. There might be errors in the JSON text. Or, the data in the JSON text cannot be translated perfectly to VBA. Or, there might be a bug […]

VBA code: Check if the deserialization is OK


If you try to put the content of the JSON text into a variable of the type Dictionary, several things could go wrong. After a deserialization, it is good practice to check if it was ok. To do this, you can use the function IsOk. If all is ok, don't […]

VBA code: Show Why JSON Is Incorrect


The method SetHowToConvertJSONNull Description The sub SetHowToConvertJSONNull defines the VBA type and value into which the JSON value null will be converted when deserializing. The only thing that the sub SetHowToConvertJSONNullToVBA does is set a parameter in the class cJSON. The parameter is used when deserializing the argument JSONText of […]

VBA code: Set How To Convert JSON Null



The number format in a JSON text allows for all kind of numbers: from basic numbers to arbitrarily large and arbitrarily precise numbers. Because of that, it is not sure that each number in your JSON text can be fitted into one of the number types of VBA. There are […]

VBA code: Set How To Convert JSON Number To VBA


Before you can use the data that is in a JSON text in VBA, you must make it available in VBA. In other words, you need to put the content of the JSON text into a VBA variable. One simple option is to put the JSON text into a variable […]

VBA code: Deserialize JSON