From 7a6b4dc12cc0878f39ffd23276cc82f7acc4f35c Mon Sep 17 00:00:00 2001 From: zz977 Date: Tue, 5 Nov 2019 19:01:29 +0800 Subject: [PATCH] fix bug of ask sparql --- Query/ResultSet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Query/ResultSet.cpp b/Query/ResultSet.cpp index fe0941b..88c69ba 100644 --- a/Query/ResultSet.cpp +++ b/Query/ResultSet.cpp @@ -225,6 +225,12 @@ ResultSet::to_JSON() _buf << "\"" + this->var_name[j].substr(1) + "\": { "; _buf << "\"type\": \"" + ans_type + "\", \"datatype\": \"" + data_type + "\", \"value\": " + Util::node2string((string("\"") + ans_str + "\"").c_str()) + " }"; } + else if(ans_str == "true" || ans_str == "false") + { + ans_type = "bool"; + _buf << "\"" + this->var_name[j].substr(2) + "\": { "; + _buf << "\"type\": \"" + ans_type + "\", \"value\": " + ans_str.c_str() + " }"; + } list_empty = false; } _buf << "}";