I have a plugin returning json from a controller action using $this->returnJson(...)
.
Works great in production, but when devMode = true
, the json is invalidated because Craft is still dumping the console debugging script at the end of the content.
What's the best way to avoid this?