diff options
Diffstat (limited to 'json')
-rw-r--r-- | json/jsonparse.cc | 2 | ||||
-rw-r--r-- | json/jsonwrite.cc | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/json/jsonparse.cc b/json/jsonparse.cc index a36f891d..f0d0069a 100644 --- a/json/jsonparse.cc +++ b/json/jsonparse.cc @@ -907,7 +907,7 @@ bool parse_json_file(std::istream &f, std::string &filename, Context *ctx) log_info("Checksum: 0x%08x\n", ctx->checksum()); log_break(); - ctx->settings.emplace(ctx->id("input/json"), filename); + ctx->settings[ctx->id("input/json")] = filename; ctx->attributesToArchInfo(); return true; } catch (log_execution_error_exception) { diff --git a/json/jsonwrite.cc b/json/jsonwrite.cc index 19c43d7c..ac54bc4e 100644 --- a/json/jsonwrite.cc +++ b/json/jsonwrite.cc @@ -69,10 +69,9 @@ void write_module(std::ostream &f, Context *ctx) f << stringf(" %s: {\n", get_string(val->second.str).c_str()); else f << stringf(" %s: {\n", get_string("top").c_str()); - // TODO: check if this is better to be separate - /*f << stringf(" \"settings\": {"); + f << stringf(" \"settings\": {"); write_parameters(f, ctx, ctx->settings, true); - f << stringf("\n },\n");*/ + f << stringf("\n },\n"); f << stringf(" \"attributes\": {"); write_parameters(f, ctx, ctx->attrs, true); f << stringf("\n },\n"); |