Skip to content

Return an empty dictionary on error for _get_json_as_dict #43

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

Conversation

ithinkandicode
Copy link
Collaborator

Prevents issues when the target JSON does not exist, returning an empty dictionary instead. You can use dict.size() < 1 to check for this.

Copy link
Collaborator

@Qubus0 Qubus0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More static typing is always welcome

@ithinkandicode ithinkandicode merged commit 96b90f7 into GodotModding:main Jan 16, 2023
@ithinkandicode ithinkandicode deleted the return-empty-dict-get_json_as_dict branch January 17, 2023 13:01
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

Successfully merging this pull request may close these issues.

2 participants