Class JsonPatchApplier
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.JsonPatchApplier
Simplistic implementation, applies a json diff (see https://github.com/josephburnett/jd)
to an in memory json element to create a new json value.
Does not use any context hints in the diff to correct for mismatches, hence should only be used against the exact original value to produce the new value, useful for compressing json files that are derived from each other.
-
Constructor Summary
ConstructorsConstructorDescriptionJsonPatchApplier
(com.google.gson.JsonElement json) JsonPatchApplier
(File baseFile) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(JsonPatch patch, TaskMonitor monitor) void
apply
(String patchString, TaskMonitor monitor) com.google.gson.JsonElement
getJson()
void
-
Constructor Details
-
JsonPatchApplier
public JsonPatchApplier(com.google.gson.JsonElement json) -
JsonPatchApplier
- Throws:
IOException
-
-
Method Details
-
getJson
public com.google.gson.JsonElement getJson() -
apply
- Throws:
IOException
CancelledException
-
apply
- Throws:
IOException
CancelledException
-
writeJson
- Throws:
IOException
-