Fixup Val.h/Val.cc: Actually move ValFromJSON into zeek::detail

Lost during merge..
This commit is contained in:
Arne Welzel 2023-05-09 10:57:14 +02:00
parent 264284150b
commit 1facc34e09
4 changed files with 9 additions and 2 deletions

View file

@ -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