private static void serializeRemovals(@Nonnull JsonWriter jw, @Nonnull List<RemovePath> removals) throws IOException {
		jw.beginObject();
		if (!removals.isEmpty()) {
			jw.name(KEY_REMOVALS).beginArray();
			for (RemovePath removal : removals) {
				Info info = removal.path().getValueOfType(Info.class);
				if (info == null)
					continue;

				String name = info.getName();
				jw.beginObject();
				if (info.isClass()) {
					jw.name(KEY_TYPE).value(TYPE_CLASS);
					jw.name(KEY_NAME).value(name);
				} else if (info.isFile()) {
					jw.name(KEY_TYPE).value(TYPE_FILE);
					jw.name(KEY_NAME).value(name);
				}
				jw.endObject();
			}
			jw.endArray();
		}
	}
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