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

Docs show how to parse json but fall short on notifying about using try/catch #156

Open
skulptur opened this issue Jun 26, 2020 · 0 comments

Comments

@skulptur
Copy link
Contributor

If the data is incorrect, JSON.parse will throw. At the very least I think it should be mentioned in the docs that it is important/good practice to try/catch. Ideally there would be a built in helper that throws a descriptive error by default.

https://github.com/mediamonks/muban/blob/master/docs/13-guides.md#get-data-from-embedded-json

@skulptur skulptur changed the title Docs show how to parse json but doesn't falls short on notifying about using try/catch Docs show how to parse json but falls short on notifying about using try/catch Jun 26, 2020
@skulptur skulptur changed the title Docs show how to parse json but falls short on notifying about using try/catch Docs show how to parse json but fall short on notifying about using try/catch Jun 26, 2020
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