public static String convertToJson(String yamlString) {
        try {
            ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
            Object obj = yamlReader.readValue(yamlString, Object.class);

            ObjectMapper jsonWriter = new ObjectMapper();
            return jsonWriter.writeValueAsString(obj);
        } catch (JsonProcessingException e) {
            throw new UncheckedIOException(e);
        }
    }
<p>Converts a given yamlString into a JsonString.</p>
<p>Example Usage:</p>
<pre>{@code
String jsonString = convertToJson(yourYamlString);}
</pre>
@param yamlString the yaml to convert
@return the json conversion of the yaml string.
test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java