Feature/json request

@markstory there is existing code that doesn't do the check:

```php
		if (isset($detect['callback']) && is_callable($detect['callback'])) {
			return call_user_func($detect['callback'], $this);
		}
```

Fix this as well?