public void write() throws IOException {
            for (Map.Entry<String, Properties> entry : toExport.entrySet()) {
                Properties props = entry.getValue();
                writeProperties(props, entry.getKey());
                globalExport.putAll(props);
            }

            if (globalFile != null && !globalExport.isEmpty()) {
                writeProperties(globalExport, globalFile);
            }
        }
Return the content of the mapping as an array with all specifications as given

@return port mappings as JSON array or null if no mappings exist
src/main/java/io/fabric8/maven/docker/access/PortMapping.java