We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46f284b commit 4c47679Copy full SHA for 4c47679
mne_bids/utils.py
@@ -226,14 +226,14 @@ def _check_types(variables):
226
)
227
228
229
-def _write_json(fname, dictionary, overwrite=False):
+def _write_json(fname, dictionary, overwrite=False, ensure_ascii=False):
230
"""Write JSON to a file."""
231
if op.exists(fname) and not overwrite:
232
raise FileExistsError(
233
f'"{fname}" already exists. Please set overwrite to True.'
234
235
236
- json_output = json.dumps(dictionary, indent=4)
+ json_output = json.dumps(dictionary, indent=4, ensure_ascii=ensure_ascii)
237
with open(fname, "w", encoding="utf-8") as fid:
238
fid.write(json_output)
239
fid.write("\n")
0 commit comments