Java 中的 REST API 补丁

REST API PATCH in Java

如果我要在这个 and the RFC 6902 中实施已接受的答案,我是否还需要创建一个 class,其字段包括 op路径来自?

正如@chrylis 所回答的,我宁愿必须创建一个 class with op, path, valuefrom 是字段。

您可能不想编写自己的 JSON 补丁解析器。


更新: 我最近整理了一份 example on how to support JSON Patch and JSON Merge Path in Spring applications. The approach I've used is described in this post.