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:
parent
337ade9e4c
commit
4d50398f02
2 changed files with 47 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue