mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00

The broxygen-generated files now live in the git repo, have tests that check that they are up-to-date, and a script to re-generate them on-demand.
39 lines
1.2 KiB
ReStructuredText
39 lines
1.2 KiB
ReStructuredText
:tocdepth: 3
|
|
|
|
base/utils/json.bro
|
|
===================
|
|
|
|
Functions to assist with generating JSON data from Bro data scructures.
|
|
|
|
:Imports: :doc:`base/utils/strings.bro </scripts/base/utils/strings.bro>`
|
|
|
|
Summary
|
|
~~~~~~~
|
|
Functions
|
|
#########
|
|
======================================= ============================================================
|
|
:bro:id:`to_json`: :bro:type:`function` A function to convert arbitrary Bro data into a JSON string.
|
|
======================================= ============================================================
|
|
|
|
|
|
Detailed Interface
|
|
~~~~~~~~~~~~~~~~~~
|
|
Functions
|
|
#########
|
|
.. bro:id:: to_json
|
|
|
|
:Type: :bro:type:`function` (v: :bro:type:`any`, only_loggable: :bro:type:`bool` :bro:attr:`&default` = ``F`` :bro:attr:`&optional`, field_escape_pattern: :bro:type:`pattern` :bro:attr:`&default` = ``/^?(^_)$?/`` :bro:attr:`&optional`) : :bro:type:`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.
|
|
|
|
|