binary json format introduced + specification
This commit is contained in:
+14
-8
@@ -7,6 +7,8 @@
|
||||
#include <filesystem>
|
||||
#include "../typedefs.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace json {
|
||||
class JObject;
|
||||
}
|
||||
@@ -25,14 +27,18 @@ namespace files {
|
||||
};
|
||||
|
||||
|
||||
extern bool write_bytes(std::filesystem::path, const char* data, size_t size);
|
||||
extern uint append_bytes(std::filesystem::path, const char* data, size_t size);
|
||||
extern bool read(std::filesystem::path, char* data, size_t size);
|
||||
extern char* read_bytes(std::filesystem::path, size_t& length);
|
||||
extern std::string read_string(std::filesystem::path filename);
|
||||
extern bool write_string(std::filesystem::path filename, const std::string content);
|
||||
extern json::JObject* read_json(std::filesystem::path file);
|
||||
extern std::vector<std::string> read_list(std::filesystem::path file);
|
||||
extern bool write_bytes(fs::path, const char* data, size_t size);
|
||||
extern uint append_bytes(fs::path, const char* data, size_t size);
|
||||
extern bool write_string(fs::path filename, const std::string content);
|
||||
extern bool write_json(fs::path filename, const json::JObject* obj, bool nice=true);
|
||||
extern bool write_binary_json(fs::path filename, const json::JObject* obj);
|
||||
|
||||
extern bool read(fs::path, char* data, size_t size);
|
||||
extern char* read_bytes(fs::path, size_t& length);
|
||||
extern std::string read_string(fs::path filename);
|
||||
extern json::JObject* read_json(fs::path file);
|
||||
extern json::JObject* read_binary_json(fs::path file);
|
||||
extern std::vector<std::string> read_list(fs::path file);
|
||||
}
|
||||
|
||||
#endif /* FILES_FILES_H_ */
|
||||
Reference in New Issue
Block a user