Skip to content

Commit

Permalink
Merge pull request #50 from ionrock/remove-cjson
Browse files Browse the repository at this point in the history
Remove cjson in favor of the python json module.
  • Loading branch information
rohitagarwal003 committed Jun 5, 2014
2 parents f09e5b1 + 5cfe614 commit bca2100
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions qds_sdk/connection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys
import requests
import cjson
import logging
import ssl
import json
Expand Down Expand Up @@ -64,7 +63,7 @@ def _api_call_raw(self, req_type, path, data=None):
kwargs = {'headers': self._headers, 'auth': self.auth, 'verify': not self.skip_ssl_cert_check}

if data:
kwargs['data'] = cjson.encode(data)
kwargs['data'] = json.dumps(data)

log.info("[%s] %s" % (req_type, url))
log.info("Payload: %s" % json.dumps(data, indent=4))
Expand Down
5 changes: 2 additions & 3 deletions qds_sdk/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
qds_sdk.Resource represents a REST based resource with standard methods like
create/find etc.
"""

import json
import util
import cjson
from qubole import Qubole


Expand Down Expand Up @@ -79,7 +78,7 @@ def __getattr__(self, name):
raise AttributeError(name)

def __str__(self):
return cjson.encode(self.attributes)
return json.dumps(self.attributes)


class Resource(BaseResource):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
from setuptools import setup

INSTALL_REQUIRES = ['python_cjson', 'requests >=1.0.3', 'boto >=2.1.1']
INSTALL_REQUIRES = ['requests >=1.0.3', 'boto >=2.1.1']
if sys.version_info < (2, 7, 0):
INSTALL_REQUIRES.append('argparse>=1.1')

Expand Down

0 comments on commit bca2100

Please sign in to comment.