]> git.ipfire.org Git - thirdparty/curl.git/commit
writeout: support to generate JSON output
authorMathias Gumz <mg@2hoch5.com>
Sat, 1 Feb 2020 17:55:24 +0000 (18:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 17 Mar 2020 14:01:28 +0000 (15:01 +0100)
commit04c03416e68fd635a15cae8201872f5c29fdcca8
tree6b10d49ed62cd8a23b4a254e144c9b90321cfc7b
parentd83402813b624d9067416bea2e7feb70a358cf65
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
lib/version.c
packages/Symbian/group/curl.mmp
src/Makefile.inc
src/tool_writeout.c
src/tool_writeout.h
src/tool_writeout_json.c [new file with mode: 0644]
src/tool_writeout_json.h [new file with mode: 0644]