From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: arturo.borrero.glez@gmail.com, alvaroneay@gmail.com
Subject: Re: [PATCH libnftnl] src: consolidate XML/JSON exportation
Date: Mon, 10 Nov 2014 12:25:04 +0100 [thread overview]
Message-ID: <20141110112504.GA20864@salvia> (raw)
In-Reply-To: <1415614927-5465-1-git-send-email-pablo@netfilter.org>
On Mon, Nov 10, 2014 at 11:22:07AM +0100, Pablo Neira Ayuso wrote:
> Add new buffer class to consolidate the existing code to export objects
> in XML/JSON and use it. We save ~700 LOC with this change.
>
> The rule and set objects are not yet consolidated. It seems this would
> require some specific glue code per representation type since lists are
> arranged differently.
>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
> @Arturo, @Alvaro: It seems to me that the XML and JSON are currently not
> round-trippable due to (at least) this difference:
>
> <expr type="meta">...</expr>
> "expr":[{"type":"meta",...
>
> Two choices:
>
> * XML uses <expr><type>meta</type>...</expr>.
> * JSON uses "expr":[{"-type":"meta",...
>
> in any case, I think we'll have to break the representation for one of
> them to fix this.
I accidentally sent an old version of this patch. This change has
spotted and fixed many inconsistencies in the output of expressions.
I'll resend the newer patch again.
prev parent reply other threads:[~2014-11-10 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 10:22 [PATCH libnftnl] src: consolidate XML/JSON exportation Pablo Neira Ayuso
2014-11-10 11:25 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141110112504.GA20864@salvia \
--to=pablo@netfilter.org \
--cc=alvaroneay@gmail.com \
--cc=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).