mirror of
https://github.com/curl/curl.git
synced 2026-08-01 14:58:54 +03:00
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
This commit is contained in:
parent
d83402813b
commit
04c03416e6
8 changed files with 361 additions and 83 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue