def render(file):
with file.open() as fp:<EOL><INDENT>encoding = detect_encoding(fp, default='<STR_LIT:utf-8>')<EOL>file_content = fp.read().decode(encoding)<EOL>json_data = json.loads(file_content, object_pairs_hook=OrderedDict)<EOL>return json.dumps(json_data, indent=<NUM_LIT:4>, separators=('<STR_LIT:U+002C>', '<STR_LIT>'))<EOL><DEDENT>
Pretty print the JSON file for rendering.