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 TypeMethodDescriptionvoidapply(JsonPatch patch, TaskMonitor monitor) voidapply(String patchString, TaskMonitor monitor) com.google.gson.JsonElementgetJson()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:
IOExceptionCancelledException
-
apply
- Throws:
IOExceptionCancelledException
-
writeJson
- Throws:
IOException
-