private static void serializeTextPatches(@Nonnull List<TextFilePatch> textFilePatches, @Nonnull JsonWriter jw) throws IOException {
		if (!textFilePatches.isEmpty()) {
			jw.name(KEY_FILE_TEXT_DIFFS).beginArray();
			for (TextFilePatch textPatch : textFilePatches) {
				String fileName = textPatch.path().getValue().getName();
				jw.beginObject();
				jw.name(KEY_NAME).value(fileName);
				jw.name(KEY_DIFFS).beginArray();
				for (StringDiff.Diff assemblerDiff : textPatch.textDiffs())
					serializeStringDiff(jw, assemblerDiff);
				jw.endArray().endObject();
			}
			jw.endArray();
		}
		jw.endObject();
	}
Maps a workspace patch into JSON.

@param patch
		Patch to serialize.

@return JSON string representation of the patch.
recaf-core/src/main/java/software/coley/recaf/services/workspace/patch/PatchSerialization.java