mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Make ValFromJSON return zeek::expected instead of a variant
This commit is contained in:
parent
e545fe8256
commit
201d4508e6
6 changed files with 64 additions and 60 deletions
|
@ -1774,8 +1774,8 @@ namespace detail {
|
|||
//
|
||||
// The *key_func* parameter is a Zeek script function called for every JSON key
|
||||
// for normalization. If Func::nil is passed, no normalization happens.
|
||||
extern std::variant<ValPtr, std::string> ValFromJSON(std::string_view json_str, const TypePtr& t,
|
||||
const FuncPtr& key_func);
|
||||
extern zeek::expected<ValPtr, std::string> ValFromJSON(std::string_view json_str, const TypePtr& t,
|
||||
const FuncPtr& key_func);
|
||||
|
||||
// If the given vector is an empty vector-of-any ("unspecified"),
|
||||
// concretizes it to the given type. *v* gives the vector and *t* the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue