1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-08 23:07:35 +00:00

LibGUI: Add store(), add() and remove() methods to JsonArrayModel

This patchset adds the methods to alter an JSON model and store it back
to the disk.
This commit is contained in:
Emanuel Sprung 2020-03-26 20:01:23 +01:00 committed by Andreas Kling
parent 337ade9e4c
commit 4d50398f02
2 changed files with 47 additions and 0 deletions

View file

@ -76,6 +76,10 @@ public:
const String& json_path() const { return m_json_path; }
void set_json_path(const String& json_path);
bool add(const Vector<JsonValue>&& fields);
bool remove(int row);
bool store();
private:
JsonArrayModel(const String& json_path, Vector<FieldSpec>&& fields)
: m_json_path(json_path)