base/utils/json.bro

Functions to assist with generating JSON data from Bro data scructures.

Imports:base/utils/strings.bro
Source File:/scripts/base/utils/json.bro

Summary

Functions

to_json: function A function to convert arbitrary Bro data into a JSON string.

Detailed Interface

Functions

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.
Copyright 2016, The Bro Project. Last updated on January 10, 2019. Created using Sphinx 1.7.5.