Doug Whitfield

Doug Whitfield at

I keep on getting told this isn't valid JSON. Can someone tell what I am doing?

generate_post_data()
{
        cat << EOF
{
  "client_id": "5cc312cee54277001312d232",
  "secret": "",
  "count": 500,
  "offset": 1
}
EOF
}

#while $x = $total
# test of function call in curl
curl -X POST https://sandbox.plaid.com/institutions/get -H 'Content-Type: application/json' --data "(generate_post_data)"

The actual error:
{
  "display_message": null,
  "error_code": "INVALID_BODY",
  "error_message": "body could not be parsed as JSON",
  "error_type": "INVALID_REQUEST",
  "request_id": "WnnobVglKsKqYmZ",
  "suggested_action": null
}

McClane shared this.

I figured this out, but now I am having problems with my while loop. At this point, I wonder if it makes sense to rewrite it in python. I don't know python, but not being able to tell bash something is an int seems to be limiting me

Doug Whitfield at 2019-05-19T00:34:17Z