Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
If I want to import some JSON and then update it with a subsequent POST (using the :replace=true flag), the nodes are updated, but not the properties.
curl -u admin:admin -F":operation=import" -F":contentType=json" -F':content={"columns":
{"one":"value"}, "layout": "dev"}' http://localhost:8080/dashboard
If I do a subsequent POST with the :replace parameter:
curl -u admin:admin -F":operation=import" -F":contentType=json" -F':content={"columns":
{"one":"love"}, "layout": "dev"}' -F":replace=true" http://localhost:8080/dashboard
The columns object is updated, but the layout property is not. I tracked this down to Sling's DefaultContentCreator, whose createProperty method expressly won't overwrite a property if it already exists.