基本Json格式化。

This commit is contained in:
2026-03-29 19:25:59 +08:00
parent 4c8cf346ea
commit 1bc2c2bcbf
10 changed files with 376 additions and 0 deletions

22
formater/fmt.json.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef FMT_JSON_H
#define FMT_JSON_H
#include <string>
#include "util/axc.util.h"
class JsonFormatter
{
public:
JsonFormatter();
public:
std::string format(const std::string& path, const FormatterArg& arg);
bool formatContent(const std::string& content, const FormatterArg& arg, std::string& outContent);
bool save(const std::string& path, const std::string& content);
private:
std::shared_ptr<spdlog::logger> logger;
};
#endif // FMT_JSON_H