Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool doesn't work if json is indented with tabs. #30

Open
klmz opened this issue Jan 22, 2020 · 0 comments
Open

Tool doesn't work if json is indented with tabs. #30

klmz opened this issue Jan 22, 2020 · 0 comments

Comments

@klmz
Copy link

klmz commented Jan 22, 2020

I was trying to use your tool, and ran into some issues. My problem was with this line:

# Note that JSON is valid YAML, so we can use the YAML parser whether
# the schema is stored in JSON or YAML
data = yaml.load(response.read(), Loader=yaml.SafeLoader)

This is only true if the JSON is indented with spaces instead of tabs.

I would propose to just convert indentation to spaces before using the yaml parser. Agreed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant