From a74c9682c9d407c69163cf49a0abd12e37f41430 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 2 Oct 2018 13:44:36 +0200 Subject: [PATCH 1/2] JSON lib fixes --- lib/json.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/json.cpp b/lib/json.cpp index c7ea0ca0..e4175ebc 100644 --- a/lib/json.cpp +++ b/lib/json.cpp @@ -1196,7 +1196,8 @@ std::string JSON::Value::toString() const { } case DOUBLE: { std::stringstream st; - st << dblVal; + st.precision(10); + st << std::fixed << dblVal; return st.str(); break; } @@ -1260,10 +1261,19 @@ std::string JSON::Value::toPrettyString(int indentation) const { } case DOUBLE: { std::stringstream st; - st << dblVal; + st.precision(10); + st << std::fixed << dblVal; return st.str(); break; } + case BOOL: { + if (intVal != 0){ + return "true"; + }else{ + return "false"; + } + break; + } case STRING: { for (unsigned int i = 0; i < 201 && i < strVal.size(); ++i) { if (strVal[i] < 32 || strVal[i] > 126 || strVal.size() > 200) { From cefc8dc88d6fc90cedff075208c038b92bcc5bfb Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 2 Oct 2018 13:48:23 +0200 Subject: [PATCH 2/2] Fixed CMakeLists header for MistOutHTTP --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ed81542..728c8972 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,6 +364,7 @@ makeOutput(HLS hls http ts) makeOutput(EBML ebml) add_executable(MistOutHTTP + ${BINARY_DIR}/mist/.headers src/output/mist_out.cpp src/output/output.cpp src/output/output_http.cpp