lib/util/fs.py
def save_json_file(fp, data, encoding='utf-8'):
    '''
    Serializes and writes out `data` to `fp`. The data should be provided as
    a `dict`, and will be serialized to a JSON string. The `fp` parameter
    should support a `write` method.
    The `encoding` parameter is used when encoding the serialized data.
    '''
    json_str = json.dumps(data)
    json_bytes = json_str.encode(encoding=encoding)
    fp.write(json_bytes)

    Serializes and writes out `data` to `fp`. The data should be provided as
    a `dict`, and will be serialized to a JSON string. The `fp` parameter
    should support a `write` method.
    The `encoding` parameter is used when encoding the serialized data.
    
Serializes and writes out `data` to `fp`. The data should be provided as
a `dict`, and will be serialized to a JSON string. The `fp` parameter
should support a `write` method.
The `encoding` parameter is used when encoding the serialized data.
Serializes and writes out ` data ` to ` fp ` . The data should be provided as a ` dict ` and will be serialized to a JSON string . The ` fp ` parameter should support a ` write ` method . The ` encoding ` parameter is used when encoding the serialized data .
def save_json_file(fp, data, encoding='utf-8'):
    json_str = json.dumps(data)
    json_bytes = json_str.encode(encoding=encoding)
    fp.write(json_bytes)
def save_json_file ( fp , data , encoding = 'utf-8' ) : json_str = json . dumps ( data ) json_bytes = json_str . encode ( encoding = encoding ) fp . write ( json_bytes )
Serializes and writes out `data` to `fp`.
Serializes and writes out ` data ` to ` fp ` .
'''
    Serializes and writes out `data` to `fp`. The data should be provided as
    a `dict`, and will be serialized to a JSON string. The `fp` parameter
    should support a `write` method.
    The `encoding` parameter is used when encoding the serialized data.
    '''
fp
data
encoding