Merge branch 'development' into LTS_development
This commit is contained in:
commit
aee6420943
2 changed files with 13 additions and 2 deletions
|
@ -457,6 +457,7 @@ if (DEFINED WITH_SANITY )
|
|||
endif()
|
||||
|
||||
add_executable(MistOutHTTP
|
||||
${BINARY_DIR}/mist/.headers
|
||||
src/output/mist_out.cpp
|
||||
src/output/output.cpp
|
||||
src/output/output_http.cpp
|
||||
|
|
14
lib/json.cpp
14
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue