GetDKAN / RootedJsonData

Access and modify JSON-based data objects while enforcing JSON Schema
GNU General Public License v3.0
1 stars 0 forks source link

Add wrapper for add() #11

Closed dafeder closed 3 years ago

dafeder commented 3 years ago

There is currently no way to add an element to an existing array. While in the future we might want to add a push() method that would work with only arrays and validate the path more strictly, this gets us what we need without much bloat on the RootedJsonData class.

See RootedJsonDatatTest::testAdd() for a working example of appending a string to an existing string of values.

See JsonPath\JsonObject::add() for the original function being wrapped here.