Commit 08ad159f authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko Committed by Nikola Hardi
Browse files

In StdOut print only the 'message' part of server reply

parent 71cb271c
...@@ -528,23 +528,14 @@ void TJAlien::Stdout() ...@@ -528,23 +528,14 @@ void TJAlien::Stdout()
json_object_object_get_ex(jobj_res, "results", &js_results); json_object_object_get_ex(jobj_res, "results", &js_results);
if (js_results != NULL && json_object_is_type(js_results, json_type_array)) if (js_results != NULL && json_object_is_type(js_results, json_type_array))
{ {
/*TString message_stream = json_object_get_string(json_object_object_get(js_results, "message"));
if (message_stream != NULL && message_stream.Length() != 0)
printf("%s\n", message_stream.Data());*/
int arraylen = json_object_array_length(js_results); int arraylen = json_object_array_length(js_results);
int i; int i;
for (i = 0; i < arraylen; i++) for (i = 0; i < arraylen; i++)
{ {
//Info("TJAlien", "===================");
json_object *jvalue = json_object_array_get_idx(js_results, i); json_object *jvalue = json_object_array_get_idx(js_results, i);
json_object_object_foreach(jvalue, key, val) TString message_stream = json_object_get_string(json_object_object_get(jvalue, "message"));
{ if (message_stream != NULL && message_stream.Length() != 0)
printf("%s\t", json_object_get_string(val)); printf("%s\n", message_stream.Data());
UNUSED(key);
}
printf("\n");
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment