mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
make map format checker for workload specific to map structures
This commit is contained in:
@@ -164,8 +164,8 @@ public class OpsLoader {
|
|||||||
// into the parsers in a non-exception way
|
// into the parsers in a non-exception way
|
||||||
public static boolean isYaml(String workload) {
|
public static boolean isYaml(String workload) {
|
||||||
try {
|
try {
|
||||||
new Load(LoadSettings.builder().build()).loadFromString(workload);
|
Object result = new Load(LoadSettings.builder().build()).loadFromString(workload);
|
||||||
return true;
|
return (result instanceof Map);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user