Skip to content

Consider using JSON patch for updates #3

@hahn-kev

Description

@hahn-kev

Here's a Wikipedia page about it.
https://en.wikipedia.org/wiki/JSON_Patch
Basically instead of sending the server an object with some of the properties changed, we would send a list of operations to apply to the object. For example {operation: 'set', field: 'name', value: 'Kevin'} which is an operation to set the name field to the value 'Kevin'.

The great benefit of this would be that we can track what was changed for the purpose of activity tracking.

The biggest difficulty would be that the front end would have to generate the patch instead of just passing up a modified version of what they received, however there are some js libraries that can generate a patch given the original object and the one after changes have been made.

I'm not sure how important tracking field changes are for activity though, otherwise I'm not sure how useful this would be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions