我在下面收到这个奇怪的错误
json.c:81:19: warning: missing terminating " character [enabled by default]
json.c:81:3: error: missing terminating " character
json.c:82:32: error: expected ‘,’ or ‘;’ before ‘:’ token
json.c:90:22: warning: missing terminating " character [enabled by default]
json.c:90:21: error: missing terminating " character
代码:
int main()
{
char * string = "{
"sender" : "joys of programming",
"receiver": [ "123",
"345",
"654",
"432"
]
}";
printf("JSON string: %sn", string);
json_object * jobj = json_tokener_parse(string);
json_parse(jobj);
return 0;
}
我理解错误是关于char * string
线的。但不知道如何解决。