code: function jsonHandler(callback) {
    return {
      type: 'text',
      fn: (error, xhrObject) => {
        if (error) {
          callback(error);
          return;
        }
        callback(null, JSON.parse(xhrObject.response));
      },
    };
  }
docs: JSON handler