JSON deserialization problem(" array must be initialized with a brace-enclosed")

why is it returning Blink:34: error: array must be initialized with a brace-enclosed initializer
i think everything is okay, but why is it returning this kind of error, please help me out, no idea how to solve it, I've tried googling a solution...

URL of the webservice : http://webapplication120180312113839.azurewebsites.net/customer/get/1

String payload = http.getString(); //Get the request response payload
char json[200] = payload;

char json[200] = {payload}; "a brace-enclosed initializer"

melbryanflores316:
...
i think everything is okay.
...
String payload = http.getString(); //Get the request response payload
char json[200] = payload;

The use of String (capital S) is usually not so OK :wink:

I have no idea if you can convert a String to a char array like you do (but have my doubts, see PS below); maybe look at Strings's toCharArray method if you insist on using String.

PS
Ah, you can't, the compiler will throw errors
1)
on your code
2)
on GrooveFlotilla's code, but that was just to show what a brace enclosed initialiser is

melbryanflores316:
why is it returning Blink:34: error: array must be initialized with a brace-enclosed initializer
i think everything is okay, but why is it returning this kind of error, please help me out, no idea how to solve it, I've tried googling a solution...

URL of the webservice : http://webapplication120180312113839.azurewebsites.net/customer/get/1

String payload = http.getString(); //Get the request response payload
char json[200] = payload;

Try to use the function "toCharArray".