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

Add a reader mode with more exceptions #50

Open
mmastrac opened this issue Dec 24, 2020 · 2 comments
Open

Add a reader mode with more exceptions #50

mmastrac opened this issue Dec 24, 2020 · 2 comments

Comments

@mmastrac
Copy link
Owner

Per conversation with @dweiss in another issue, we should probably have a reader mode where exceptions are more readily thrown for things like type cast exceptions.

@mmastrac
Copy link
Owner Author

My API suggestion is that we should set this on readers themselves at construction time, something like:

JsonReader.throwCastExceptions().from(...)

This would match the builder style of JsonWriter from https://github.com/mmastrac/nanojson/blob/master/src/main/java/com/grack/nanojson/JsonWriter.java#L154

@dweiss
Copy link
Collaborator

dweiss commented Dec 26, 2020

+1.

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

2 participants