diff --git a/runtime/actions.cpp b/runtime/actions.cpp index 46da58b..edc1d1f 100644 --- a/runtime/actions.cpp +++ b/runtime/actions.cpp @@ -7,6 +7,8 @@ auto sliger::rpc::action::RunDebug::perform_action( { auto program = this->instructions; vm.load_and_run(program); + writer->write("{ \"ok\": true }"); + writer->flush(); }; auto sliger::rpc::action::FlameGraph::perform_action( @@ -15,10 +17,10 @@ auto sliger::rpc::action::FlameGraph::perform_action( { auto json = vm.flame_graph_json(); if (json) { - writer->write( - std::format("{{ ok: true, flameGraph: \"{}\" }}", json.value())); + writer->write(std::format( + "{{ \"ok\": true, \"flameGraph\": \"{}\" }}", json.value())); } else { - writer->write("null"); + writer->write("{ \"ok\": false }"); } writer->flush(); }; @@ -29,10 +31,10 @@ auto sliger::rpc::action::CodeCoverage::perform_action( { auto json = vm.code_coverage_json(); if (json) { - writer->write( - std::format("{{ ok: true, codeCoverage: \"{}\" }}", json.value())); + writer->write(std::format( + "{{ \"ok\": true, \"codeCoverage\": \"{}\" }}", json.value())); } else { - writer->write("{ ok: false }"); + writer->write("{ \"ok\": false }"); } writer->flush(); };