<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def render(file):
 """Pretty print the JSON file for rendering."""

    with file.open() as fp:
        encoding = detect_encoding(fp, default='utf-8')
        file_content = fp.read().decode(encoding)
        json_data = json.loads(file_content, object_pairs_hook=OrderedDict)
        return json.dumps(json_data, indent=4, separators=(',', ': '))