This is caused by varValueToJsonString
when reading STRINGs or WSTRINGs that size is greater than remaining stack size. Note it does not depend on the length of the STRING.
Located in jsonAux.c
// Stringify - Do not use variable.value. It is limited to 120 characters, which is not enough
// for strings.
// TODO: This can cause a stack overflow if variable.length is very large.
// Maybe add a max size
STRING tempString[pVariable->length + 50];