Just posted version 184.108.40.206 on the Codesys Forge https://forge.codesys.com/lib/pro-json/home/Home/
Thanks Stefan for the input and testing.
Summary of changes, see comments in the code for more:
-changed how characteristics of JSONVAR variables are determined. FB_Init wasn't picking up everything on the first and last variables of a structure, and some of it is now moved to STRUCT_TO_JSON.
-added a MaxLevels input, basically to define where JSON starts to be created--was necessary especially for JSON in nested function blocks
-I've added a VariableArraySize input, to suppress creation of array positions which are null
-I've added a Format input, which will add white space an indenting to a string (for example, when writing to a file). This is not tested yet.
- a lot of minor code changes, trying to make it easier to read and more efficient