Skip to content

Commit

Permalink
Revert "Change xml2json to xml2js"
Browse files Browse the repository at this point in the history
This reverts commit 1141dbb.
  • Loading branch information
OverloadUT committed Jul 6, 2015
1 parent 1141dbb commit 5d8bae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var uuid = require('uuid');
var url = require('url');
var request = require('request');
var Q = require('q');
var xml2js = require('xml2js');
var xml2json = require('xml2json');

var uri = require('./uri');
var auth = require('./auth');
Expand Down Expand Up @@ -122,7 +122,7 @@ PlexAPI.prototype._request = function _request(relativeUrl, method, parseRespons
return deferred.resolve(JSON.parse(body.toString('utf8')));
}
if (response.headers['content-type'].indexOf('xml') > -1) {
return deferred.resolve(xml2js.parseString(body.toString('utf8'), {
return deferred.resolve(xml2json.toJson(body.toString('utf8'), {
object: true
}));
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"q": "^1.0.1",
"request": "^2.36.0",
"uuid": "^2.0.1",
"xml2js": "^0.4.9"
"xml2json": "^0.6.2"
},
"devDependencies": {
"expect.js": "*",
Expand Down

0 comments on commit 5d8bae9

Please sign in to comment.