add ordered_json variants for reading files

This commit is contained in:
2022-11-24 20:50:02 +01:00
parent 191e9f6b44
commit ab0e5afb94
2 changed files with 28 additions and 0 deletions

View File

@@ -78,6 +78,9 @@ class FilesystemService : public Service {
nlohmann::json readJson(fs_file_t file) const;
nlohmann::json readJson(const char* filepath) const;
nlohmann::ordered_json readJsonOrdered(fs_file_t file) const;
nlohmann::ordered_json readJsonOrdered(const char* filepath) const;
bool writeJson(fs_file_t file, nlohmann::json& j, const int indent = -1, const char indent_char = ' ') const;
bool writeJson(const char* filepath, nlohmann::json& j, const int indent = -1, const char indent_char = ' ') const;