private static PatchSection readPatchSection(ListIterator<String> lineIt) throws IOException {
		String line = lineIt.hasNext() ? lineIt.next() : null;
		if (line == null) {
			return null;
		}
		if (!line.startsWith("@ ")) {
			throw new IOException("bad start of patch section: " + line);
		}

		JsonElement pathElem = JsonParser.parseString(line.substring(2));

		List<PatchLine> patchLines = new ArrayList<>();
		while (lineIt.hasNext()) {
			line = lineIt.next();
			if (line.length() < 3) {
				// probably a context line, just skip it
				continue;
			}
			char opChar = line.charAt(0);
			if (opChar == '+' || opChar == '-') {
				PatchOp patchOp = PatchOp.fromChar(opChar);
				JsonElement val =
					patchOp == PatchOp.ADD ? JsonParser.parseString(line.substring(2)) : null;
				patchLines.add(new PatchLine(patchOp, val));
			}
			else if (opChar == '@') {
				lineIt.previous();
				break;
			}
		}
		PatchSection section = new PatchSection(pathElem.getAsJsonArray(), patchLines);
		return section;
	}
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