added json() method to core for outputting json, added isJson() to
request class to check if the request was json