Hello,
My understanding is that you are trying to use the “jdataencoder” function from JSONLab and you are not able to generate code for this function. In fact, code generation functionality is not provided for the inbuilt MATLAB function “jsonencode” as well.
A possible workaround for the issue would be to use a “C Function” block in Simulink to convert your structure into a JSON string with the help of any custom code or C libraries. Please refer to the following MathWorks video link to learn more about using C Function block.
I hope this helps.