News for hackers. Stuff that matters.
Re:The time might come when we add some JSON specific comman... by mkdirp on Thursday January 20, 2022 @01:48PM (#30012921)
The issue is probably related to quotations among other shell related things. Observe:

    NAME=taterman
    [email protected]
    curl --jp "user=$NAME" --jp "email=$EMAIL" http://getdemtaters.com
vs

    curl -d "{\"user:\"$NAME\",\"email\":\"$EMAIL\"}" http://getdemtaters.com
Even adding jq to requirements doesn't make it that much better:

    jq -n --arg name "$NAME" --arg email "$EMAIL" '{ "user": $name, "email": $email }' | curl -d @-
Re:The time might come when we add some JSON specific comman... by overtomanu on Thursday January 20, 2022 @02:18PM (#30013345)
it might be easier if you use heredoc