private static PatchLine lineFromJson(JsonObject jsonObj) throws IOException {
		PatchOp op = jsonObj.get("op") instanceof JsonPrimitive prim
				? PatchOp.fromChar(prim.getAsCharacter())
				: null;
		JsonElement value = jsonObj.get("value");
		if (op == null || op == PatchOp.ADD && value == null) {
			throw new IOException("bad patch element: " + jsonObj);
		}
		return new PatchLine(op, value);
	}
Converts this patch to a json array.

@return json array with json encoded patch/diff elements.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/JsonPatch.java