private JsonElement findParent(JsonArray path) throws IOException {
		// handles the corner case of a bare value that is not inside a json container by
		// optionally returning our artificial rootContainer, or the actual json value
		// The code that is determining the targetId of the value also needs to know about this hack

		if (path.size() == 0) {
			return rootContainer;
		}

		JsonElement current = rootContainer.get(ROOT_ELEM_NAME); // skip the root container since there is a path
		if (current == null) {
			// shouldn't happen
			throw new IOException("missing rootContainer element");
		}
		try {
			for (int i = 0; i < path.size() - 1; i++) {
				JsonElement pathElem = path.get(i);
				JsonElement nextElem = null;
				if (pathElem instanceof JsonPrimitive prim) {
					if (prim.isString()) {
						nextElem = current.getAsJsonObject().get(prim.getAsString());
					}
					else if (prim.isNumber()) {
						int index = prim.getAsNumber().intValue();
						nextElem = current.getAsJsonArray().get(index);
					}
				}
				if (nextElem == null) {
					throw new IOException(
						"Could not find next element in path: " + path + ", " + i);
				}
				current = nextElem;
			}
			return current;
		}
		catch (IllegalStateException e) {
			throw new IOException("invalid json diff data");
		}
	}
Simplistic implementation, applies a json diff (see https://github.com/josephburnett/jd)
to an in memory json element to create a new json value.
<p>
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.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/JsonPatchApplier.java