Skip to content

fix: add a function that reads json safely#2

Merged
CipherX0101 merged 1 commit into
CipherX0101:mainfrom
JohnMartin0301:json-issue-solution
Nov 21, 2025
Merged

fix: add a function that reads json safely#2
CipherX0101 merged 1 commit into
CipherX0101:mainfrom
JohnMartin0301:json-issue-solution

Conversation

@JohnMartin0301
Copy link
Copy Markdown
Contributor

This update adds a function that safely reads and parses JSON input.

Key changes:

  • Wrapped json.loads() in a try/except block to prevent the program from crashing on invalid JSON.
  • Returns a descriptive error dictionary when the input cannot be decoded.

@CipherX0101 CipherX0101 merged commit 80c08d7 into CipherX0101:main Nov 21, 2025
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