zeek/doc/scripts/base/utils/json.bro.rst
Jon Siwek 7e9d48f532 Remove broxygen Sphinx integration
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.
2018-12-18 10:15:22 -06:00

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.