| 构造器和说明 |
|---|
JsonDiff() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
castInput(String value,
DiffOptions options)
允许子类在运行前处理输入
|
static List<ChangeObject<String>> |
diffJson(Object oldObj,
Object newObj)
对两个 JSON 对象进行差异比较
|
static List<ChangeObject<String>> |
diffJson(Object oldObj,
Object newObj,
DiffOptions options)
对两个 JSON 对象进行差异比较(带选项)
|
List<ChangeObject<String>> |
diffObjects(Object oldObj,
Object newObj)
对象差异比较
|
List<ChangeObject<String>> |
diffObjects(Object oldObj,
Object newObj,
DiffOptions options)
对象差异比较(带选项)
|
protected boolean |
equals(String left,
String right,
DiffOptions options)
比较两个 token 是否相等
|
static JsonDiff |
getInstance() |
protected List<String> |
tokenize(String value,
DiffOptions options)
将值标记化为 token 数组
|
protected boolean |
useLongestToken()
是否使用最长的 token
|
diff, diff, join, postProcess, removeEmptypublic static JsonDiff getInstance()
public static List<ChangeObject<String>> diffJson(Object oldObj, Object newObj)
oldObj - 旧对象newObj - 新对象public static List<ChangeObject<String>> diffJson(Object oldObj, Object newObj, DiffOptions options)
oldObj - 旧对象newObj - 新对象options - 差异选项public List<ChangeObject<String>> diffObjects(Object oldObj, Object newObj)
public List<ChangeObject<String>> diffObjects(Object oldObj, Object newObj, DiffOptions options)
protected boolean useLongestToken()
DiffuseLongestToken 在类中 Diff<String>protected String castInput(String value, DiffOptions options)
Diffprotected boolean equals(String left, String right, DiffOptions options)
DiffCopyright © 2025. All rights reserved.