exactonline/rawapi.py
def _json_safe(data):
    """
    json.loads wants an unistr in Python3. Convert it.
    """
    if not hasattr(data, 'encode'):
        try:
            data = data.decode('utf-8')
        except UnicodeDecodeError:
            raise ValueError(
                'Expected valid UTF8 for JSON data, got %r' % (data,))
    return data
def _json_safe(data):
    if not hasattr(data, 'encode'):
        try:
            data = data.decode('utf-8')
        except UnicodeDecodeError:
            raise ValueError(
                'Expected valid UTF8 for JSON data, got %r' % (data,))
    return data
def _json_safe ( data ) : if not hasattr ( data , 'encode' ) : try : data = data . decode ( 'utf-8' ) except UnicodeDecodeError : raise ValueError ( 'Expected valid UTF8 for JSON data, got %r' % ( data , ) ) return data
json.loads wants an unistr in Python3. Convert it.
json . loads wants an unistr in Python3 . Convert it .