curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: -w %{JSON}

From: Коваленко Анатолий Викторович via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 21 May 2020 21:43:24 +0300

Sorry my English, please.

I did not know about PR 5435. Now I know.

But I still do not know what the result will be in case of «-w %{JSON}» AND another variables
(content_type, filename_effective, etc) together. This is not described in the manual.
And the JSON output will always be consist from ONE line? This is not described in the manual too.

> On Wed, 20 May 2020, Коваленко Анатолий Викторович via curl-users wrote:

>> Sorry, is there any other output beyond «Saved to filename» and
>> «--write-out»?

> You mean *ever* ? Yes. But in for your use case? I don't think so...

>> Now I can see THREE variants (in terms of PowerShell):
>> 1) [String] (i.e. scalar) JSON when «-w %{JSON}»;
>> 2) [String[]] (i.e. array of TWO strings – «Saved to filename» and «JSON») when «-w %{JSON}» and
>> uTorrent/balenaEtcher;
>> 3) array of MANY strings when «-w %{Not-JSON}».

> I don't understand.

> Are you saying that there still is other output to stdout apart from the JSON
> output with your command line when you have PR 5435 [*] applied? If so, can
> you show us what output that is, how it looks when you run the commands?

> [*] = https://github.com/curl/curl/pull/5435

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-21