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