Class YamlOperations
java.lang.Object
gov.nist.secauto.metaschema.databind.io.yaml.YamlOperations
-
Method Summary
Modifier and TypeMethodDescriptionParse the data represented in YAML in the providedtarget, producing an mapping of field names to Java object values.static org.json.JSONObjectyamlToJson(Map<String, Object> map) Converts the provided YAMLmapinto JSON.
-
Method Details
-
parseYaml
Parse the data represented in YAML in the providedtarget, producing an mapping of field names to Java object values.- Parameters:
target- the YAML file to parse- Returns:
- the mapping of field names to Java object values
- Throws:
IOException- if an error occurred while parsing the YAML content
-
yamlToJson
Converts the provided YAMLmapinto JSON.- Parameters:
map- the YAML map- Returns:
- the JSON object
- Throws:
org.json.JSONException- if an error occurred while building the JSON tree
-