diff --git a/src/storm/storage/jani/JSONExporter.cpp b/src/storm/storage/jani/JSONExporter.cpp index 4bfb71e03..ed08b7a98 100644 --- a/src/storm/storage/jani/JSONExporter.cpp +++ b/src/storm/storage/jani/JSONExporter.cpp @@ -1094,6 +1094,10 @@ namespace storm { jsonStruct["properties"] = properties; } - + modernjson::json JsonExporter::finalize() { + jsonStruct["features"] = modernjson::json::parse(modelFeatures.toString()); + return jsonStruct; + } + } } diff --git a/src/storm/storage/jani/JSONExporter.h b/src/storm/storage/jani/JSONExporter.h index 1e6eefb50..0bd1486f2 100644 --- a/src/storm/storage/jani/JSONExporter.h +++ b/src/storm/storage/jani/JSONExporter.h @@ -97,10 +97,7 @@ namespace storm { void convertProperties(std::vector const& formulas, storm::jani::Model const& model); void appendVariableDeclaration(storm::jani::Variable const& variable); - modernjson::json finalize() { - jsonStruct["features"] = modelFeatures.toString(); - return jsonStruct; - } + modernjson::json finalize(); modernjson::json jsonStruct; storm::jani::ModelFeatures modelFeatures; diff --git a/src/storm/storage/jani/ModelFeatures.cpp b/src/storm/storage/jani/ModelFeatures.cpp index 8bb8d6475..8ea1c769b 100644 --- a/src/storm/storage/jani/ModelFeatures.cpp +++ b/src/storm/storage/jani/ModelFeatures.cpp @@ -21,15 +21,16 @@ namespace storm { } std::string ModelFeatures::toString() const { - std::string res; + std::string res = "["; bool first = true; for (auto const& f : features) { if (!first) { res += ", "; } - res += storm::jani::toString(f); + res += "\"" + storm::jani::toString(f) + "\""; first = false; } + res += "]"; return res; }