Ah, the classic post json curl struggle! Your command looks mostly correct, but yeah, escaping quotes can be a pain. If your JSON has nested quotes, try wrapping the whole thing in single quotes and escaping the inner doubles with a backslash, like this:
```bash
curl -H "Content-Type: application/json" -d '{\"key\":\"value with \\\"quotes\\\" inside\"}' http://example.com/api
```
And nah, you don’t *need* `-X POST` if you’re using `-d`, since curl defaults to POST with data. But it doesn’t hurt to be explicit.
```bash
curl -H "Content-Type: application/json" -d '{\"key\":\"value with \\\"quotes\\\" inside\"}' http://example.com/api
```
And nah, you don’t *need* `-X POST` if you’re using `-d`, since curl defaults to POST with data. But it doesn’t hurt to be explicit.
