]> git.ipfire.org Git - thirdparty/ipset.git/commit
Fix json output for -name option
authorMark <mark@glines.org>
Tue, 12 Dec 2023 08:30:40 +0000 (09:30 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Tue, 12 Dec 2023 08:30:40 +0000 (09:30 +0100)
commit8b3824f9e209754135e7afa52a8f056eabb3442b
treee7d62821a203dfccad46ca6b1e7cba8a6f3e1d51
parentca62c0e1640e5d112679044434227024690b53bc
Fix json output for -name option

When listing just the set names,json output generated key:value pairs
in an array and not a map, which is invalid in json. Instead of

[
"name" : "test"
"name" : "test2"
]

generate

[
  { "name" : "test" },
  { "name" : "test2" }
]

Fixes bugzilla #1726.

Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
lib/session.c