def json(self):
        """
        Generate a basic JSON representation of the result.

        @return: A JSON object with 1 property: result.
        """
        if not self.result is None and 'value' in self.result:
            sort = abs(self.result['value'])
            party = _('Democrat') if self.result['value'] > 0 else _('Republican')
            output = {'result': (party, sort) % '%s %d'}
        else:
            output = {'result': None}

        return json.dumps(output)
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/RepresentationalFairness.json/swapped operands of `%`