-->
Page 1 of 1

JSONTREE_ARRAY with dynamic size

PostPosted: Wed Dec 14, 2016 6:50 pm
by gjump
I'm working with JSON and I want to send a log, the obvious way is to use a JSONTREE_ARRAY, but the log size is dynamic, and as far as I noted, JSONTREE_ARRAY's size is static. Any ideas or workarounds?

-gjump

Re: JSONTREE_ARRAY with dynamic size

PostPosted: Wed Jan 25, 2017 4:51 pm
by efess
I'm a little late, but what I did was instead of using the macro, just create the structure yourself and allocate space on the heap depending on how many elements you have. This worked for me.