mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Document the field_escape_pattern in the to_json() BiF
This argument, and its corresponding use in Val.cc's BuildJSON(), were never explained.
This commit is contained in:
parent
c2dd3dfad0
commit
a29f862f95
3 changed files with 41 additions and 2 deletions
14
src/Val.h
14
src/Val.h
|
@ -236,6 +236,20 @@ public:
|
|||
|
||||
TableValPtr GetRecordFields();
|
||||
|
||||
/**
|
||||
* Renders the Val into JSON string representation. For record values
|
||||
* contained anywhere in the Val, two arguments control the JSON result
|
||||
* (they have no effect on other types):
|
||||
*
|
||||
* @param only_loggable If true, skips any fields that don't have the &log
|
||||
* attribute.
|
||||
*
|
||||
* @param re The regular expression matcher, if given, is used to strip the
|
||||
* first match on any record field name in the resulting output. See the
|
||||
* to_json() BiF for context.
|
||||
*
|
||||
* @return JSON data representing the Val.
|
||||
*/
|
||||
StringValPtr ToJSON(bool only_loggable = false, RE_Matcher* re = nullptr);
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue