@SuppressWarnings("unchecked")
	private boolean processUnion(Map<String, Object> result) throws InvalidDataTypeException {
		String name = (String) result.get("name");
		CategoryPath path = getCategoryPath(result);
		String comment = getRegularComment(result);
		Union union = new UnionDataType(path, name);
		processSettings(result, union.getDefaultSettings());

		if (comment != null) {
			union.setDescription(comment);
		}
		Object alignmentMin = result.get("explicitMinimumAlignment");
		if (alignmentMin != null) {
			union.setExplicitMinimumAlignment((int) (double) alignmentMin);
		}

		String packing = (String) result.get("packed");
		if (packing != null) {
			isPacked.put(getPath(union), Boolean.valueOf(packing));
			// NB: not this - struct.setPackingEnabled(Boolean.valueOf(packing));
			Object epval = result.get("explicitPackingValue");
			if (epval != null) {
				packingValue.put(getPath(union), (int) (double) epval);
			}
		}

		dataTypes.put(getPath(union), union);

		boolean processedAll = true;
		Map<String, Object> fields = (Map<String, Object>) result.get("fields");
		for (Entry<String, Object> entry : fields.entrySet()) {
			processedAll &= processUnionMembers(entry, union);
		}
		if (processedAll) {
			addDataType(getPath(union), union);
		} else {
			dataTypes.put(getPath(union), union);
		}
		return processedAll;
	}
Reads the datatypes encoded in SARIF from the specified SARIF parser and
recreates them in a datatype manager.

@param result  the SARIF parser
@param monitor the task monitor
@throws SAXParseException  if an SARIF parse error occurs
@throws CancelledException if the user cancels the read operation
Ghidra/Features/Sarif/src/main/java/sarif/managers/DataTypesSarifMgr.java