def encode_json(obj, inline=False, **kwargs):
 encoder = JSONEncoder(encoding=u'UTF-8', default=functools.partial(_object_encoder, inline=inline), **kwargs)
 return encoder.encode(obj)

def encode_json ( obj , inline = False , ** kwargs ) : encoder = JSONEncoder ( encoding = u'UTF-8' , default = functools . partial ( _object_encoder , inline = inline ) , ** kwargs ) return encoder . encode ( obj )
encode the given object as json .