Project

General

Profile

« Previous | Next » 

Revision 14537

lib/strings.py: added json_decode()

View differences:

trunk/lib/strings.py
114 114
def json_encode(str_):
115 115
    return replace_all(json_encode_map, esc_quotes(str_, '"'))
116 116

  
117
def json_decode(str_): return str_.decode('string_escape')
118

  
117 119
def esc_for_mogrify(query):
118 120
    '''Escapes a query right before being passed to a mogrifying function.'''
119 121
    return query.replace('%', '%%')

Also available in: Unified diff