'Given some Python data, produces JSON output.'

def to_json(self, data, options=None):

    options = (options or {})
    data = self.to_simple(data, options)
    return djangojson.json.dumps(data, cls=djangojson.DjangoJSONEncoder, sort_keys=True, ensure_ascii=False)
