From 96b35ff078c0ea59b85c682ca5f162d7f4d289ea Mon Sep 17 00:00:00 2001 From: Winant Pablo Date: Sun, 12 Feb 2017 12:54:58 +0100 Subject: [PATCH] FIX: JSON remove space before symbols + quote values --- NumericalInitialization.cc | 4 ++-- SymbolTable.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NumericalInitialization.cc b/NumericalInitialization.cc index 6e4dcd26..c9ebe608 100644 --- a/NumericalInitialization.cc +++ b/NumericalInitialization.cc @@ -66,9 +66,9 @@ InitParamStatement::writeJuliaOutput(ostream &output, const string &basename) void InitParamStatement::writeJsonOutput(ostream &output) const { - output << "{\"statementName\": \"param_init\", \"name\": \"" << symbol_table.getName(symb_id) << "\", " << "\"value\": "; + output << "{\"statementName\": \"param_init\", \"name\": \"" << symbol_table.getName(symb_id) << "\", " << "\"value\": \""; param_value->writeOutput(output); - output << "}"; + output << "\"}"; } void diff --git a/SymbolTable.cc b/SymbolTable.cc index 84deb2a5..04b46de0 100644 --- a/SymbolTable.cc +++ b/SymbolTable.cc @@ -1025,9 +1025,9 @@ SymbolTable::writeJsonVarVector(ostream &output, const vector &varvec) cons for (int i = 0; i < varvec.size(); i++) { output << endl << "{" - << "\"name\":\" " << getName(varvec[i]) << "\", " - << "\"texName\":\" " << boost::replace_all_copy(getTeXName(varvec[i]), "\\", "\\\\") << "\", " - << "\"longName\":\" " << boost::replace_all_copy(getLongName(varvec[i]), "\\", "\\\\") << "\"}"; + << "\"name\":\"" << getName(varvec[i]) << "\", " + << "\"texName\":\"" << boost::replace_all_copy(getTeXName(varvec[i]), "\\", "\\\\") << "\", " + << "\"longName\":\"" << boost::replace_all_copy(getLongName(varvec[i]), "\\", "\\\\") << "\"}"; if (i < varvec.size() - 1) output << ", "; }