json decoding and utf-8
Hi guys,
I've faced with the following issue:
const char* raw = "{\"value\":\"(\\u00fc)\"}";
char buf[128]; strcpy(buf, raw);
json_io json(buf);
json.decode();
word base = json.get_object(JSON_ID_ROOT, 0);
const char* value = json.get_string(base, "value");
printf("value=%s length=%zu\n", value, strlen(value));
The output of this test is the following:
value=() length=2
I would expect it to return me "(\u00fc)" rather than "()".
Is it expected behavior? If so, what is the correct way to get a full string as it is from the json?
Best regards,
Sergey


