|
|
@ -219,10 +219,12 @@ static int accessHandlerCallback(void *cls,
|
|
|
|
string suggestion;
|
|
|
|
string suggestion;
|
|
|
|
content = "[";
|
|
|
|
content = "[";
|
|
|
|
while (reader->getNextSuggestion(suggestion)) {
|
|
|
|
while (reader->getNextSuggestion(suggestion)) {
|
|
|
|
|
|
|
|
content += (content == "[" ? "" : ",");
|
|
|
|
content += "{\"value\":\"" + suggestion + "\",\"label\":\"" + suggestion + "\"}";
|
|
|
|
content += "{\"value\":\"" + suggestion + "\",\"label\":\"" + suggestion + "\"}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
content += content == "[" ? "" : ",";
|
|
|
|
content += (content == "[" ? "" : ",");
|
|
|
|
content += "{\"value\":\"" + std::string(term) + " \", \"label\":\"containing '" + std::string(term) + "'...\"}]";
|
|
|
|
content += "{\"value\":\"" + std::string(term) + " \", \"label\":\"containing '" + std::string(term) + "'...\"}]";
|
|
|
|
|
|
|
|
std::cout << content << std::endl;
|
|
|
|
mimeType = "text/x-json; charset=utf-8";
|
|
|
|
mimeType = "text/x-json; charset=utf-8";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|