~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/__init__.py

  • Committer: Colin Watson
  • Date: 2020-07-10 09:45:47 UTC
  • mfrom: (503.1.1 remove-simplejson)
  • Revision ID: cjwatson@canonical.com-20200710094547-9vpm5ez1uquyi59h
[r=ilasc] Drop dependency on simplejson.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# along with this program; if not, write to the Free Software
18
18
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335  USA
19
19
 
 
20
import json
 
21
import time
 
22
 
20
23
import breezy.errors
21
 
import simplejson
22
 
import time
23
24
 
24
25
from breezy import osutils
25
26
 
122
123
        z = time.time()
123
124
        w = BufferingWriter(writer, 8192)
124
125
        if environ.get('loggerhead.as_json'):
125
 
            w.write(simplejson.dumps(values,
 
126
            w.write(json.dumps(values,
126
127
                default=util.convert_to_json_ready).encode('utf-8'))
127
128
        else:
128
129
            self.add_template_values(values)