public JsonObject getMetadata() {
		JsonObject metadata = header.optionalHeaderData();

		// If we weren't able to get the optional header data, create a new empty JSON
		// object
		if (metadata == null) {
			metadata = new JsonObject();
		}

		JsonObject optionalFooterData = null;

		try {
			optionalFooterData = footer.optionalFooterData();
		}
		catch (CartInvalidCartException e) {
			// ignore
		}

		// If we were able to get the optional footer data then merge it's data with
		// whatever metadata is already available.
		if (optionalFooterData != null) {
			for (Entry<String, JsonElement> entry : optionalFooterData.entrySet()) {
				// This will overwrite any existing header values when the footer contains
				// a conflicting key. This is the same behavior as the python library.
				metadata.add(entry.getKey(), entry.getValue());
			}
		}

		return metadata;
	}
Get the combined optional header and optional footer data as a single
combined JSON object. This is similar to how the original python CaRT library
works. Including, the fact that footer values will overwrite header values
when keys collide. An empty JSON object will be returned if neither the
optional header nor footer is available.

@return The metadata JSON object.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cart/CartV1File.java