From 04c03416e68fd635a15cae8201872f5c29fdcca8 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Sat, 1 Feb 2020 18:55:24 +0100 Subject: writeout: support to generate JSON output This commit adds support to generate JSON via the writeout feature: -w "%{json}" It leverages the existing infrastructure as much as possible. Thus, generating the JSON on STDERR is possible by: -w "%{stderr}%{json}" This implements a variant of https://github.com/curl/curl/wiki/JSON#--write-out-json. Closes #4870 --- docs/cmdline-opts/write-out.d | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/cmdline-opts') diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d index 2fc0ff21a..9024d32e0 100644 --- a/docs/cmdline-opts/write-out.d +++ b/docs/cmdline-opts/write-out.d @@ -50,6 +50,9 @@ curl CONNECT request. (Added in 7.12.4) .B http_version The http version that was effectively used. (Added in 7.50.0) .TP +.B json +A JSON object with all available keys. +.TP .B local_ip The IP address of the local end of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0) -- cgit v1.2.3