curl 7.82.0 Adds --json Option
Curl's version 7.82.0, released early March 2022, has a new option to deal with JSON data: --json.


It's actually a combination of the following options:
--data
--header "Content-Type: application/json"
--header "Accept: application/json"

Notice that curl does not check if the provided data is a valid JSON expression:

More JSON features may be added to curl in the future, but that debate is still ongoing.
Didier Stevens
Senior handler
Microsoft MVP
blog.DidierStevens.com
×
Diary Archives

Comments