diff --git a/flex/utils/yaml_utils.cc b/flex/utils/yaml_utils.cc index 775c4245ea2a..ecfb76ae44df 100644 --- a/flex/utils/yaml_utils.cc +++ b/flex/utils/yaml_utils.cc @@ -52,12 +52,16 @@ void convert_yaml_node_to_json(const YAML::Node& node, json.SetInt(node.as()); } catch (const YAML::BadConversion& e) { try { - json.SetDouble(node.as()); + json.SetInt64(node.as()); } catch (const YAML::BadConversion& e) { try { - json.SetBool(node.as()); + json.SetDouble(node.as()); } catch (const YAML::BadConversion& e) { - json.SetString(node.as().c_str(), allocator); + try { + json.SetBool(node.as()); + } catch (const YAML::BadConversion& e) { + json.SetString(node.as().c_str(), allocator); + } } } }