bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js
function xhrJson(method, url, options) {
		if (options && typeof options.data !== 'undefined') {
			options.data = JSON.stringify(options.data);
		}
		return xhr.apply(null, Array.prototype.slice.call(arguments)).then(function(result) {
			return JSON.parse(result.response || null);
		});
	}
function xhrJson(method, url, options) {
		if (options && typeof options.data !== 'undefined') {
			options.data = JSON.stringify(options.data);
		}
		return xhr.apply(null, Array.prototype.slice.call(arguments)).then(function(result) {
			return JSON.parse(result.response || null);
		});
	}
function xhrJson ( method , url , options ) { if ( options && typeof options . data !== 'undefined' ) { options . data = JSON . stringify ( options . data ) ; } return xhr . apply ( null , Array . prototype . slice . call ( arguments ) ) . then ( function ( result ) { return JSON . parse ( result . response || null ) ; } ) ; }
Invoke the xhr API passing JSON data and returning the response as JSON.
@returns {Deferred} A deferred that resolves to a JS object, or null if the server returned
an empty response.
Invoke the xhr API passing JSON data and returning the response as JSON .