Skip to content

How to apply JSON patch locally? #184

Answered by eneufeld
Yunabell-VU asked this question in All other
Discussion options

You must be logged in to vote

Hi @Yunabell-VU ,

Yes the modelserver allows to modify the model using patches. You should use the Modelserver client, if you don't do so yet, to send patches to the modelserver.
You can find an example in the coffee editor for this. The relevant code for you is this method: https://github.com/eclipse-emfcloud/coffee-editor/blob/master/client/coffee-editor-extension/src/browser/coffee-tree/coffee-tree-editor-widget.tsx#L212

So the idea is, create a patch manually or using library like fast-json-patch.
Then use the ModelServerClient @eclipse-emfcloud/modelserver-client to edit the model.

If you need more information let us know.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Yunabell-VU
Comment options

@eneufeld
Comment options

@Yunabell-VU
Comment options

Answer selected by Yunabell-VU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants