You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
381 B

from __future__ import absolute_import, print_function
import six
try:
import ujson as json
except ImportError:
import json
from disco.gateway.encoding.base import BaseEncoder
class JSONEncoder(BaseEncoder):
TYPE = 'json'
@staticmethod
def encode(obj):
return json.dumps(obj)
@staticmethod
def decode(obj):
return json.loads(obj)