You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, ruamel does not support JSON files with tabs as whitespace, because YAML does not support tabs. As this routine is used to load various JSON files, which can be formatted howsoever the user formatted them, we need to support JSON with tabs.
As a workaround, we could catch this specific exception and fallback to the JSON loader.
Or we use a parameter to the routine like we have it for the write equivalent:
ruamel can't load JSON files with tabs as whitespace
if this specific excpetion is thrown, try loading the file with
json.load instead
this adds some tests for the load_configuration function
with JSON files and YAML file
fixes#1999
ruamel can't load JSON files with tabs as whitespace
if this specific excpetion is thrown, try loading the file with
json.load instead
this adds some tests for the load_configuration function
with JSON files and YAML file
fixes#1999
ruamel can't load JSON files with tabs as whitespace
if this specific excpetion is thrown, try loading the file with
json.load instead
this adds some tests for the load_configuration function
with JSON files and YAML file
fixes#1999
For the switch to YAML in configuration files, we switched to the ruamel.yaml loader, which supports JSON and YAML:
intelmq/intelmq/lib/utils.py
Lines 201 to 216 in cf87d90
However, ruamel does not support JSON files with tabs as whitespace, because YAML does not support tabs. As this routine is used to load various JSON files, which can be formatted howsoever the user formatted them, we need to support JSON with tabs.
As a workaround, we could catch this specific exception and fallback to the JSON loader.
Or we use a parameter to the routine like we have it for the write equivalent:
intelmq/intelmq/lib/utils.py
Lines 222 to 224 in cf87d90
The text was updated successfully, but these errors were encountered: