Set dataType to JSON on Ajax request

Some times the files requested does not have the application/json header. Then, force jQuery to parse the json if the header is not set correct. The change maintains the option to change the request type.