stac-api-extensions / transaction

The Transaction Extension supports the creation, editing, and deleting of items through POST, PUT, PATCH, and DELETE requests.
Apache License 2.0
1 stars 2 forks source link

Is JSON Merge PATCH RFC7396 compatible with STAC? #13

Open rhysrevans3 opened 2 months ago

rhysrevans3 commented 2 months ago

In JSON Merge Patch RFC7396 null values are given special meaning to indicate the removal of existing values in the target.

This isn't recommended for documents that allow explicit null values like STAC.

This design means that merge patch documents are suitable for
describing modifications to JSON documents that primarily use objects
for their structure and do not make use of explicit null values.

Should JSON Patch RFC6902 be supported? This allow for operations (add, remove, replace, move, copy, test) to be declared which allows the setting of null values.

Both can be supported simultaneously through the use of the Accept/Content-Type headers application/merge-patch+json and application/json-patch+json

m-mohr commented 4 days ago

See also https://github.com/opengeospatial/ogcapi-features/issues/957