From 45e678a00002d215842a795aed5571f705829a82 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Wed, 8 Oct 2014 15:17:25 -0700 Subject: [PATCH] Revert "Fix to remove quotes around array of strings as attribute value. Patch 2: Fixed same for array of bool Change-Id: Ib732ac8aff643cc579f57aafee27dee39b2f33f7" This reverts commit f9f016f533d200725ad39f1af34b67af529a8949. Change-Id: Idbc9ddb9b93e189f3fb55c1cb0ede0d0a4989303 --- include/OCApi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/OCApi.h b/include/OCApi.h index f69fe3d..7219c6a 100644 --- a/include/OCApi.h +++ b/include/OCApi.h @@ -283,13 +283,13 @@ namespace OC { std::ostringstream json; - json << "["; + json << "\"["; if(v.size() != 0) { std::copy(v.begin(), v.end() - 1, std::ostream_iterator(json, ",")); json << v.back(); } - json << "]"; + json << "]\""; return json.str(); } @@ -346,7 +346,7 @@ namespace OC std::ostringstream json; int first = 1; - json << "["; + json << "\"["; for(auto b: bools) { if(first) @@ -359,7 +359,7 @@ namespace OC b ? json << ",true" : json << ",false"; } } - json << "]"; + json << "]\""; return json.str(); } -- 2.7.4