Functions to assist with generating JSON data from Bro data scructures.
Imports: | base/utils/strings.bro |
---|---|
Source File: | /scripts/base/utils/json.bro |
to_json
¶Type: | function (v: any , only_loggable: bool &default = F &optional , field_escape_pattern: pattern &default = /^?(^_)$?/ &optional ) : string |
---|
A function to convert arbitrary Bro data into a JSON string.
V: | The value to convert to JSON. Typically a record. |
---|---|
Only_loggable: | If the v value is a record this will only cause fields with the &log attribute to be included in the JSON. |
Returns: | a JSON formatted string. |