Is there a way to use json-patch to build jsonpatches?
Closed this issue · 3 comments
chmorgan commented
I'm trying to build a json patch at runtime and created a struct for an operation (op, path, value) but was thinking maybe there was some way to build patches that might have been developed as a part of the library? I looked in patch.go etc and didn't spot anything though. Maybe its not trivial given that you could have tons of nesting etc?
kayoub5 commented
@chmorgan consider using https://github.com/wbish/jsondiffpatch.net
chmorgan commented
@kayoub5 that could be an option but I'm using golang server side (and could use this for tests), and TypeScript client side
timbunce commented
I've been a happy user of https://github.com/wI2L/jsondiff to generate JSON Patches on a Golang server.