Unmarshal YAML.

@param yamlContent YAML content
@return map from YAML
193087
public static Map<?, ?> unmarshal(final String yamlContent) {
        return Strings.isNullOrEmpty(yamlContent) ? new LinkedHashMap<>() : (Map) new Yaml().load(yamlContent);
    }
44108
public static Config fromYAML(String content) throws IOException {
        ConfigSupport support = new ConfigSupport();
        return support.fromYAML(content, Config.class);
    }
1359791
public MapContentType getMapContentType(ContainerType containerType){
        JaversType keyType = getJaversType(Integer.class);
        JaversType valueType = getJaversType(containerType.getItemType());
        return new MapContentType(keyType, valueType);
    }
1352292
def from_xml(content_types_xml):
        
        types_elm = parse_xml(content_types_xml)
        ct_map = _ContentTypeMap()
        for o in types_elm.overrides:
            ct_map._add_override(o.partname, o.content_type)
        for d in types_elm.defaults:
            ct_map._add_default(d.extension, d.content_type)
        return ct_map
322263
private void unmarshalWithExplodedStrategy(EmbeddedMetadata embeddedMetadata, Object target)
      throws Throwable {
    Object embeddedObject = initializeEmbedded(embeddedMetadata, target);
    for (PropertyMetadata propertyMetadata : embeddedMetadata.getPropertyMetadataCollection()) {
      unmarshalProperty(propertyMetadata, embeddedObject);
    }
    for (EmbeddedMetadata embeddedMetadata2 : embeddedMetadata.getEmbeddedMetadataCollection()) {
      unmarshalWithExplodedStrategy(embeddedMetadata2, embeddedObject);
    }
    ConstructorMetadata constructorMetadata = embeddedMetadata.getConstructorMetadata();
    if (constructorMetadata.isBuilderConstructionStrategy()) {
      embeddedObject = constructorMetadata.getBuildMethodHandle().invoke(embeddedObject);
    }
    embeddedMetadata.getWriteMethod().invoke(target, embeddedObject);
  }
785835
public HashMap<String,Double> getArrayMeasures(JSONObject jsonContent){
		HashMap<String,Double> i = new HashMap<String,Double>();
		return i;
	}
194916
public static MessageProtocol fromContentTypeHeader(Optional<String> contentType) {
        return contentType.map(ct -> {
            String[] parts = ct.split(";");
            String justContentType = parts[0];
            Optional<String> charset = Optional.empty();
            for (int i = 1; i < parts.length; i++) {
                String toTest = parts[i].trim();
                if (toTest.startsWith("charset=")) {
                    charset = Optional.of(toTest.split("=", 2)[1]);
                    break;
                }
            }
            return new MessageProtocol(Optional.of(justContentType), charset, Optional.empty());
        }).orElse(new MessageProtocol());
    }
321635
public static ImageTransformProcess fromYaml(String yaml) {
        try {
            return JsonMappers.getMapperYaml().readValue(yaml, ImageTransformProcess.class);
        } catch (IOException e) {
            //TODO better exceptions
            throw new RuntimeException(e);
        }
    }
159427
public static <T> T unmarshal(Class<T> cl, Source s) throws JAXBException {
    JAXBContext ctx = JAXBContext.newInstance(cl);
    Unmarshaller u = ctx.createUnmarshaller();
    return u.unmarshal(s, cl).getValue();
  }
296064
@JsonIgnore
    public void encodeAndSetContent(byte[] byteContent) {

        if (byteContent == null) {
            this.content = null;
            return;
        }

        this.content = Base64.getEncoder().encodeToString(byteContent);
        encoding = "base64";
    }
756204
private static String mapContent(DataHandler dh) {
        if (dh == null) {
            return "";
        }
        try {
            InputStream is = dh.getInputStream();
            String content = IOUtils.toString(is);
            is.close();
            return content;
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
809683
@Override
    public Object unmarshal(Source source) throws IOException, XmlMappingException {
        if (source instanceof StAXSource) {
            source = fixStAXSource((StAXSource) source);
        }

        final Transformer identityTransformer;
        try {
            identityTransformer = this.xmlUtilities.getIdentityTransformer();
        } catch (TransformerConfigurationException e) {
            throw new RuntimeException("Failed to create identity Transformer", e);
        }

        final DOMResult domResult = new DOMResult();
        try {
            identityTransformer.transform(source, domResult);
        } catch (TransformerException e) {
            throw new RuntimeException("Failed to transform " + source + " into Document", e);
        }

        final Document resultDoc = (Document) domResult.getNode();
        return new Tuple<String, Document>(source.getSystemId(), resultDoc);
    }
921078
protected Object unmarshal() throws IOException, JSONException {
		json = new JSONTokener(new InputStreamReader(inputStream, "UTF-8")).nextValue();
		inputStream.close();
		return json;
	}
847424
public Object unmarshal(HierarchicalStreamReader reader,
			UnmarshallingContext context) {
		XEventImpl event = new XEventImpl();

		String id = reader.getAttribute("xid");
		event.setID(XID.parse(id));

		if (reader.hasMoreChildren()) {
			reader.moveDown();
			XAttributeMap attributes = (XAttributeMap) context.convertAnother(
					event, XAttributeMap.class,  XesXStreamPersistency.attributeMapConverter);
			event.setAttributes(attributes);
			reader.moveUp();
		}
		return event;
	}
1009797
public static ParameterAveragingTrainingMaster fromYaml(String yamlStr) {
        ObjectMapper om = getYamlMapper();
        try {
            return om.readValue(yamlStr, ParameterAveragingTrainingMaster.class);
        } catch (IOException e) {
            throw new RuntimeException("Could not parse YAML", e);
        }
    }
1266949
public static Map<?, ?> toMap(String xml, String encoding) throws UnmarshalException {
		Map<?, ?> map = (Map<?, ?>)toObject(xml, encoding, Map.class);
		return map;
	}
1345486
public MarkLogicNode getContentAsMarkLogicNode() {
        if (contentType == ContentType.XML || 
            contentType == ContentType.TEXT) {
            return new MarkLogicNode(getContentAsText().toString(), 
                            contentType);      
        }
        throw new UnsupportedOperationException(
            "Cannot convert JSON or binary data to MarkLogicNode.");        
    }