From 24bf28a8fb9cc8c3a90b77de9b60728bece7885d Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 18 Oct 2025 18:01:14 +0200 Subject: Moving project structure for more less compilation --- lib/c++/write_json.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/c++/write_json.hpp (limited to 'lib/c++/write_json.hpp') diff --git a/lib/c++/write_json.hpp b/lib/c++/write_json.hpp new file mode 100644 index 0000000..19bbfa6 --- /dev/null +++ b/lib/c++/write_json.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include + +#include +#include + +#include + + +namespace kel { +namespace lbm { + +template +saw::error_or write_json(const std::filesystem::path& file_name, const saw::data& field){ + saw::data j_data; + { + saw::codec j_codec; + auto eov = j_codec.encode(field, j_data); + if(eov.is_error()){ + return eov; + } + } + return saw::make_void(); +} +} +} -- cgit v1.2.3