I’m attempting to pull data from a webpage using HttpClient. This is just raw JSON that I’m getting back, which I then parse using the SparkJSON library. My Photon keeps resetting, so I’m in the process of trying to troubleshoot my code.
My question: Is this an appropriate way to pull/parse the JSON data? Right now, the high level steps are:
- Do an http.get to pull the data from the webpage on the same network.
- Convert to a char using string.length+1 of the HTTP response.
- Parse using the JSON library. Both dynamic and static buffers seem to crash on occasion, this might be how I’m parsing though.
Is there a more efficient way to run through these steps?