summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 7cf3bb68..33e3bc6e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -272,7 +272,9 @@ int main(int argc, char * const *argv)
nft_ctx_output_set_echo(nft, true);
break;
case OPT_JSON:
- nft_ctx_output_set_json(nft, true);
+#ifdef HAVE_LIBJANSSON
+ output_flags |= NFT_CTX_OUTPUT_JSON;
+#endif
break;
case OPT_INVALID:
exit(EXIT_FAILURE);