From c0549d71b2109f10c1238db8b22362e7826ba61b Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sun, 5 Jul 2026 15:59:23 +0200 Subject: Just rename from lib to modules --- modules/core/c++/write_json.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/core/c++/write_json.hpp (limited to 'modules/core/c++/write_json.hpp') diff --git a/modules/core/c++/write_json.hpp b/modules/core/c++/write_json.hpp new file mode 100644 index 0000000..19bbfa6 --- /dev/null +++ b/modules/core/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