json: allow empty string values
authorVincent Fu <vincent.fu@samsung.com>
Tue, 7 Jan 2025 20:56:19 +0000 (20:56 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 23 Jan 2025 17:57:42 +0000 (12:57 -0500)
commit4a1f2a5b76b768a237ece419379bb99e94cb0523
treeef3aa12a81105b642a67a02375dc67534c58b246
parentf5c278f2d78a6daac693a1fab1c96746d62e8fae
json: allow empty string values

The JSON standard permits empty strings. Currently fio's JSON module
returns an error when it encounters an empty string. Change this to
allow empty strings.

https://www.json.org/ is the reference I used for the JSON standard.

This is needed for upcoming patches to support FIO_OPT_STR_SET job
options (norandommap, time_based, etc) that are enabled when the option
is included without specifying a value for it. The value for these
options is best represented by an empty string. Disallowing empty string
values would prevent these options from appearing in job option
dictionaries in the JSON output.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
json.c