make map format checker for workload specific to map structures

This commit is contained in:
Jonathan Shook 2023-12-10 21:17:29 -06:00
parent 309cb67587
commit a0eaf9758b

View File

@ -164,8 +164,8 @@ public class OpsLoader {
// into the parsers in a non-exception way
public static boolean isYaml(String workload) {
try {
new Load(LoadSettings.builder().build()).loadFromString(workload);
return true;
Object result = new Load(LoadSettings.builder().build()).loadFromString(workload);
return (result instanceof Map);
} catch (Exception e) {
return false;
}