The error is likely not from the JSON but from the headers you resp. your webserver output.
Inspect these with (for example) curl:
curl -v https://your.server/webhook.cgi
In reply to Re: JSON UTF-8
by Corion
in thread JSON encoding error
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |