Skip to content

Commit

Permalink
http/post/json.md: tidy up command line example
Browse files Browse the repository at this point in the history
- use `jo <data>` instead of `jo -p <data>` since the json output is
  piped to curl and doesn't need to be pretty-printed for that purpose.

Ref: #459

Reported-by: Vladislav Sharapov

Closes #460
  • Loading branch information
jay authored and bagder committed Jun 11, 2024
1 parent d2f33bb commit 6ed3acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/post/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ one tool in particular that might help you accomplish this is [jo](https://githu

Send a basic JSON object to a server with jo and `--json`

jo -p name=jo n=17 parser=false | curl --json @- https://example.com/
jo name=jo n=17 parser=false | curl --json @- https://example.com/

## Receiving JSON

Expand All @@ -60,7 +60,7 @@ Send a basic JSON object to a server, and pretty-print the JSON response:

Send the JSON with `jo`, print the response with `jq`:

jo -p name=jo n=17 | curl --json @- https://example.com/ | jq
jo name=jo n=17 | curl --json @- https://example.com/ | jq

jq is a powerful and capable tool for extracting, filtering and managing JSON
content that goes way beyond just pretty-printing.

0 comments on commit 6ed3acb

Please sign in to comment.