add formatter for matjson

This commit is contained in:
matcool 2024-02-13 13:26:46 -03:00
parent 0d9cd74aa0
commit 32644b50d1

View file

@ -7,6 +7,7 @@
#include <ccTypes.h> #include <ccTypes.h>
#include <chrono> #include <chrono>
#include <ghc/fs_fwd.hpp> #include <ghc/fs_fwd.hpp>
#include <matjson.hpp>
#include <type_traits> #include <type_traits>
#include <fmt/core.h> #include <fmt/core.h>
// for formatting std::vector and such // for formatting std::vector and such
@ -64,6 +65,12 @@ namespace ghc::filesystem {
} }
} }
namespace matjson {
GEODE_INLINE GEODE_HIDDEN std::string format_as(matjson::Value const& value) {
return value.dump(matjson::NO_INDENTATION);
}
}
namespace geode { namespace geode {
class Mod; class Mod;