Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
deactivated json
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekziade committed Mar 20, 2015
1 parent 6896dbd commit 3eefb82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cliquet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from pyramid.events import NewRequest, NewResponse
from pyramid.httpexceptions import HTTPTemporaryRedirect, HTTPGone
from pyramid.renderers import JSON as JSONRenderer
from pyramid.security import NO_PERMISSION_REQUIRED
from pyramid_multiauth import MultiAuthenticationPolicy
from pyramid.settings import asbool, aslist
Expand Down Expand Up @@ -79,8 +78,10 @@ def monkey_patch_json(config):
requests.models.json = utils.json

# Override json renderer using ujson
renderer = JSONRenderer(serializer=lambda v, **kw: utils.json.dumps(v))
config.add_renderer('json', renderer)
# deactivated, see https://github.com/mozilla-services/cliquet/pull/132
# from pyramid.renderers import JSON as JSONRenderer
# renderer = JSONRenderer(serializer=lambda v, **kw: utils.json.dumps(v))
# config.add_renderer('json', renderer)


def load_default_settings(config):
Expand Down
2 changes: 1 addition & 1 deletion cliquet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from binascii import hexlify

# XXX see https://github.com/mozilla-services/cliquet/issues/131
#import ujson as json
# import ujson as json
import json

from cornice import cors
Expand Down

0 comments on commit 3eefb82

Please sign in to comment.