mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fixup Val.h/Val.cc: Actually move ValFromJSON into zeek::detail
Lost during merge..
This commit is contained in:
parent
264284150b
commit
1facc34e09
4 changed files with 9 additions and 2 deletions
|
@ -1795,9 +1795,12 @@ extern bool can_cast_value_to_type(const Val* v, Type* t);
|
|||
// specific instance later.
|
||||
extern bool can_cast_value_to_type(const Type* s, Type* t);
|
||||
|
||||
namespace detail
|
||||
{
|
||||
// Parses a JSON string into arbitrary Zeek data using std::variant to simulate functional exception
|
||||
// handling. Returns a ValPtr if parsing was successful, or a std::string containing an error
|
||||
// message if an error occurred.
|
||||
extern std::variant<ValPtr, std::string> ValFromJSON(std::string_view json_str, const TypePtr& t);
|
||||
}
|
||||
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue