I'm able to get json data and storing in String object, now i want to convert string into Char Array for parsing json data
I'm tried with this code, but it is not responding
String data = http.getString(); //Get the request response payload
Serial.println(data); //Print the response payload
int len=data.length();
Serial.println(len);
char buf[len + 1];
data.toCharArray(buf, len + 1);
int bufLength = sizeof(buf);
Serial.println(bufLength); //Printing nothing
c_str()
?Serial.println()
do print their stuff. 2) It converts theString
to a char array by giving you “direct access to the internal String buffer”. It's written in the doc I linked to.data[index]
. Or you can use ArduinoJson library