Merge remote-tracking branch 'amazing-pp/topic/fupeng/from_json_bif'

* amazing-pp/topic/fupeng/from_json_bif:
  Implement from_json bif

Minor updates during merge: Moved ValFromJSON into zeek::detail for the
time being, removed gotos, normalized some error messages to lower case,
minimal test extension and added a raw reader input framework test reading
"json lines" as a demo, adding notes about the implicit type
conversions.
This commit is contained in:
Arne Welzel 2023-05-09 09:26:14 +02:00
commit 264284150b
34 changed files with 695 additions and 2 deletions

View file

@ -1094,6 +1094,14 @@ type entropy_test_result: record {
serial_correlation: double; ##< Serial correlation coefficient.
};
## Return type for from_json BIF.
##
## .. zeek:see:: from_json
type from_json_result: record {
v: any &optional; ##< Parsed value.
valid: bool; ##< True if parsing was successful.
};
# TCP values for :zeek:see:`endpoint` *state* field.
# todo:: these should go into an enum to make them autodoc'able.
const TCP_INACTIVE = 0; ##< Endpoint is still inactive.