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
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Cynthia Revström via curl-users <curl-users_at_lists.haxx.se>
Date: Sun, 6 Feb 2022 01:38:08 +0100
I don't think any of the simple solutions for multiple objects would
be very useful, so I think it makes sense to either not allow it or
just (as I believe is the case now) just do what --data does.
Like I can't think of that many situations when making an array of the
JSON objects would be very useful if you consider what people are
likely to use --json for. (I imagine it being using existing services,
not designing them around curl --json).
-Cynthia
On Sat, Feb 5, 2022 at 1:29 PM Alex Bligh via curl-users
<curl-users_at_lists.haxx.se> wrote:
>
>
>
> > On 5 Feb 2022, at 10:55, Daniel Stenberg <daniel_at_haxx.se> wrote:
> >
> > Sure, but that would require that curl would need to parse and "understand" the data it sends, so it would be MUCH more complicated. I didn't want to go there with --json.
> >
> > We save that complication for the discussed possible future imaginary --jp option.
>
> I believe you can do that by simple string concatenation (just add "[" at the start, "]" at the end, and "," between each item). No need to parse the JSON :-)
>
> --
> Alex Bligh
>
>
>
>
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
Date: Sun, 6 Feb 2022 01:38:08 +0100
I don't think any of the simple solutions for multiple objects would
be very useful, so I think it makes sense to either not allow it or
just (as I believe is the case now) just do what --data does.
Like I can't think of that many situations when making an array of the
JSON objects would be very useful if you consider what people are
likely to use --json for. (I imagine it being using existing services,
not designing them around curl --json).
-Cynthia
On Sat, Feb 5, 2022 at 1:29 PM Alex Bligh via curl-users
<curl-users_at_lists.haxx.se> wrote:
>
>
>
> > On 5 Feb 2022, at 10:55, Daniel Stenberg <daniel_at_haxx.se> wrote:
> >
> > Sure, but that would require that curl would need to parse and "understand" the data it sends, so it would be MUCH more complicated. I didn't want to go there with --json.
> >
> > We save that complication for the discussed possible future imaginary --jp option.
>
> I believe you can do that by simple string concatenation (just add "[" at the start, "]" at the end, and "," between each item). No need to parse the JSON :-)
>
> --
> Alex Bligh
>
>
>
>
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2022-02-06