You probably don't want to write your own JSON Patch parser.
Java EE 8 now supports the RFC 6902 with the JSR 374 ( JSON-P 1.1 ): JsonPatch
, JsonPatchBuilder
and JsonPatch.Operation
are the main types you are looking for.
Spring Data REST also supports the RFC 6902 : PatchConverter<T>
, JsonPatchPatchConverter
, Patch
and PatchOperation
are the main types.
Alternatively, if you are use Jackson, you may consider the json-patch
library.
Update: I recently put together an example on how to support JSON Patch and JSON Merge Path in Spring applications. The approach I've used is described in this post .
作为回答@chrylis,我宁愿要创建与运算 , 路径 , 价值类, 免遭领域。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.