| 69 | } |
| 70 | |
| 71 | bool workflow_has_field(const engine::io::json::Value & object, const std::string & key) { |
| 72 | const auto * value = object.find(key); |
| 73 | return value != nullptr && !value->is_null(); |
| 74 | } |
| 75 | |
| 76 | std::optional<std::string> workflow_optional_string( |
| 77 | const engine::io::json::Value & object, |
| 78 | const std::string & key) { |
| 79 | const auto * value = object.find(key); |
| 80 | if (value == nullptr || value->is_null()) { |
| 81 | return std::nullopt; |
| 82 | } |
no test coverage detected