From add2bc2068992daf520082c2765261227afd8f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Neira=20Ayuso?= Date: Fri, 9 Aug 2013 13:13:14 +0200 Subject: src: json: delete unneeded JSON prefixes This patch adapts JSON nodes to mimic current XML node tags. Signed-off-by: Alvaro Neira Ayuso Ayuso Signed-off-by: Pablo Neira Ayuso --- src/table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/table.c') diff --git a/src/table.c b/src/table.c index 85993eb..18d9077 100644 --- a/src/table.c +++ b/src/table.c @@ -295,7 +295,7 @@ static int nft_table_json_parse(struct nft_table *t, char *json) nft_table_attr_set_u32(t, NFT_TABLE_ATTR_FAMILY, family); - if (nft_jansson_value_parse_val(root, "table_flags", + if (nft_jansson_value_parse_val(root, "flags", NFT_TYPE_U32, &table_flag) == -1) goto err; @@ -340,7 +340,7 @@ static int nft_table_snprintf_json(char *buf, size_t size, struct nft_table *t) "{\"table\" : {" "\"name\" : \"%s\"," "\"family\" : \"%s\"," - "\"table_flags\" : %d" + "\"flags\" : %d" "}" "}" , t->name, nft_family2str(t->family), t->table_flags); -- cgit v1.2.3