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: curl --json has landed

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 4 Feb 2022 23:47:59 +0100 (CET)

On Fri, 4 Feb 2022, Balakrishnan Balasubramanian wrote:

>> If you use multiple |--json| options on the same command line, the contents
>> from them will be concatenated before sent off.
>
> I wonder why would that be useful. Concatenating two valid json objects will
> result in invalid json.

Then... don't use it?

I had to decide how to act when multiple --json options are used, and we
already support multiple -d options for concatenation (even if slightly
different). I could either let the second option override the first, or
concatenate. I figured concatenate is slightly more useful.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-02-04