From 41e7932b18c8f33bcbca362c5e5e586dc8b9e513 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 4 Oct 2018 22:47:19 +0200 Subject: [PATCH] jani exporter: dont write null if no properties are given --- src/storm/storage/jani/JSONExporter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storm/storage/jani/JSONExporter.cpp b/src/storm/storage/jani/JSONExporter.cpp index 8259229fc..ca9bb2989 100644 --- a/src/storm/storage/jani/JSONExporter.cpp +++ b/src/storm/storage/jani/JSONExporter.cpp @@ -1118,7 +1118,11 @@ namespace storm { // Unset model-features that only relate to properties. These are only set if such properties actually exist. modelFeatures.remove(storm::jani::ModelFeature::StateExitRewards); - + if (formulas.empty()) { + jsonStruct["properties"] = modernjson::json(modernjson::json::value_t::array); + return; + } + uint64_t index = 0; for(auto const& f : formulas) { modernjson::json propDecl;