mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
from_json: Support function to normalize key names
When a JSON document contains key names containing colons or other special characters that are not valid in Zeek identifiers, from_json() cannot be used to parse such input. This change allows a customizable normalization function. Closes #3142.
This commit is contained in:
parent
3a8b299c35
commit
480d52ca1f
14 changed files with 102 additions and 29 deletions
4
NEWS
4
NEWS
|
@ -31,6 +31,10 @@ New Functionality
|
|||
the break statement within ``assertion_failure()`` or ``assertion_result()``
|
||||
allows to suppress the default message.
|
||||
|
||||
- The ``from_json()`` function now takes an optional key_func argument to
|
||||
normalize JSON object key names. This can be useful if the keys in a JSON
|
||||
object are not valid Zeek identifiers or reserved keywords.
|
||||
|
||||
Changed Functionality
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue