makeJsonRequest response size limit?

Former Member
Former Member
I am trying to retrieve a large amount of data with makeJsonRequest, and it seems to have an issue with the response size. Currently, the return size that I am interested in is around 50k. Is there a hard-set limit, or is there an environment variable that can be set to allocate more memory for the makeJsonRequest response size?
  • I am trying to retrieve a large amount of data with makeJsonRequest, and it seems to have an issue with the response size. Currently, the return size that I am interested in is around 50k. Is there a hard-set limit, or is there an environment variable that can be set to allocate more memory for the makeJsonRequest response size?


    Not sure about specifically the max size of the response, but the max memory available to a CIQ app/widget is 64k (including code), so with a 50K response, you could only have about 14k of code space - which may not even be enough to just make the Json request!
  • Former Member
    Former Member over 9 years ago
    I am trying to retrieve a large amount of data with makeJsonRequest, and it seems to have an issue with the response size. Currently, the return size that I am interested in is around 50k. Is there a hard-set limit, or is there an environment variable that can be set to allocate more memory for the makeJsonRequest response size?


    As Jim said, the memory limit for the application would make receiving a response that almost theoretically impossible. Also, because the has to be converted into a MonkeyC object from the byte stream that is received, you will effectively need memory available in your app space about twice the size of your request to properly receive it.

    The transfer mechanism on the devices currently can't handle a JSON payload of more than about 16KB. I wouldn't personally try anything more than about 10KB because data over BLE just isn't very fast on these devices. I think the data comes across (at best) somewhere between 0.5 and 1KB/sec, so even if we could handle a 50KB payload, it would take over a minute to receive.
  • Former Member
    Former Member over 9 years ago
    Thank you all for the responses. I would have like to get some data back, but maybe flag a buffer overrun, just to know that several stages of the process occurred. The server I am trying to link to doesn't allow for shorter responses. I may have to read the JSON data from another application, and then create a site with "slimmer" data to read. I'm on the verge of a great application for running/walking/cycling, just about any activity that involves outdoor concerns about weather (not the temperature and such), but with a bottleneck in the data volume. Again, thanks for the help. -Steve