On Tue,  1 Jan 2019 21:27:15 +0800
we...@ucloud.cn wrote:

> +             if (flags & TUNNEL_KEY)
> +                     print_string(PRINT_ANY, "key", "%s ", "key");
> +             if (flags & TUNNEL_CSUM)
> +                     print_string(PRINT_ANY, "csum", "%s ", "csum");
> +             if (flags & TUNNEL_SEQ)
> +                     print_string(PRINT_ANY, "seq", "%s ", "seq");

Although this JSON syntax is correct, it does not follow the convention
used for other flags. It generates:
                "key" : "key"

I think you should try:
                if (flags & TUNNEL_KEY)
                        print_bool(PRINT_ANY, "key", "key ", true);

or
                if (flags & TUNNEL_KEY)
                        print_null(PRINT_ANY, "key", "key ", NULL);


Reply via email to