diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2022-08-15 11:40:52 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2022-08-16 13:42:50 +0200 |
commit | 81839cc4ebf566ea9f3e6d819c7338b98cdec374 (patch) | |
tree | 9ca7a0e6d75de73b623df635a61227703bafd6d5 /man | |
parent | ce58e9d5b37c3e408f2b41c8095980490a87f2a4 (diff) | |
download | lvm2-81839cc4ebf566ea9f3e6d819c7338b98cdec374.tar.gz |
report: report numeric values (not string synonyms) for NUM and BIN fields with json_std format
Internally, NUM and BIN fields are marked as DM_REPORT_FIELD_TYPE_NUM_NUMBER
through libdevmapper API. The new 'json_std' format mandates that the report
string representing such a value must be a number, not an arbitrary string.
This is because numeric values in 'json_std' format do not have double quotes
around them. This practically means, we can't use string synonyms
("named reserved values") for such values and the report string must always
represent a proper number.
With 'json' and 'basic' formats, this is not an issue because 'basic' format
doesn't have any structure or typing at all and 'json' format puts all values
in quotes, including numeric ones.
Diffstat (limited to 'man')
-rw-r--r-- | man/lvmreport.7_main | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/man/lvmreport.7_main b/man/lvmreport.7_main index 1ef5d25db..0015cdce7 100644 --- a/man/lvmreport.7_main +++ b/man/lvmreport.7_main @@ -1335,6 +1335,10 @@ compared to the original \fBjson\fP format: .RS - it does not use double quotes around numeric values, .br +- numeric values are always expressed as numbers, not reserved strings + representing them (this also means that report/binary_values_as_numeric=1 + setting is forced) +.br - it uses 'null' for undefined numeric values, .br - it prints string list as proper JSON array of strings instead of a single string. |