https://curl.se/mail/archive-2022-01/0043.html
Download
Browse source Changelog tiny-curl
Documentation
Project Bug Bounty FAQ Help us Known bugs TODO Protocols CA
bundle HTTP Cookies HTTP/2 SSL Certs Releases Security
Version numbers Vulnerabilities curl tool man page Tutorial
HTTP scripting Videos Who and Why
libcurl
ABI API Competitors Examples Features Mailing list Related libs Using
libcurl Tutorial Testimonials
Get Help
curl-library curl-users IRC / chat Mailing lists Everything curl
[book] Video presentations Report a bug Paid support
Development
Autobuilds Code review Code style Contribute Dashboard Deprecate
Internals Release Notes Release Procedure Roadmap Run Tests Security
Process Specifications Test curl
News
Changelog Release table
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.
JSON support
* This message: [ Message body ] [ More options (top, bottom) ]
* Related messages: [ Next message ] [ Previous message ] [ Next in
thread ] [ Replies ]
* Contemporary messages sorted: [ by date ] [ by thread ] [ by
subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-users
Date: Thu, 20 Jan 2022 14:38:54 +0100 (CET)
Hello,
I've been circling around this topic before. On this list I've
previously
gotten rather lukewarm responses or even several "don't do its", but
after
having asked around people on twitter I think maybe the time might
come when
we add some JSON specific command line options to the tool.
I have three reasons why now:
1. Sending JSON has grown to become a very common thing to do in the
world of
REST APIs and more.
2. When asked what features or functionality people like in the many
curl
"alteratives" that pop up, the "ease of doing JSON" is a frequent
answer.
3. A not insignificant amount of people on stackoverflow etc have
problems to
send correct JSON with curl and to get the quoting done right, as
json uses
double-qoutes by itself and shells don't expand variables within
single quotes
etc.
I personally am not sending JSON too often myself so I'm pretty sure
I'm not
suitable to design this feature entirely on my own. I need help to
design this
to become as useful as possible.
I've drafted my refreshed concept in the curl wiki. To explain it
shortly, it
adds two command line options: one for sending already formatted json
as a
shortcut for -d with the right Accept header, and the other is an
option for
building a json request body to send. See the expanded thoughts here:
https://github.com/curl/curl/wiki/JSON
That page was previously describing a slightly different json idea,
so if you
looked at it before, look again because it's different now.
Is this a good idea? What tweaks does it need to become useful? If
you're
sending JSON with curl or an alternative tool today, could you see
yourself
using this method instead and what would be needed for that to be
really
attractive for you?
--
/ 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-01-20
* This message: [ Message body ]
* Next message: Bill Mercer via curl-users: "RE: JSON support"
* Previous message: Juan Isoza via curl-users: "Re: curl in Windows
now upgraded to 7.79.1"
* Next in thread: Bill Mercer via curl-users: "RE: JSON support"
* Reply: Bill Mercer via curl-users: "RE: JSON support"
* Reply: Jeffrey Walton via curl-users: "Re: JSON support"
* Reply: Mac-Fly via curl-users: "Re: JSON support"
* Maybe reply: Georg Horn via curl-users: "Re: JSON support"
* Contemporary messages sorted: [ by date ] [ by thread ] [ by
subject ] [ by author ] [ by messages with attachments ]