Skip to content

Add StreamReadFeature.CLEAR_CURRENT_TOKEN_ON_CLOSE (default: true) #1441

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

Closed
cowtowncoder opened this issue May 30, 2025 · 0 comments
Closed
Labels
2.20 Issue planned (at earliest) for 2.20
Milestone

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented May 30, 2025

(follow-up to #1438 )

Due to risks of regression, let's add a StreamReadFeature for determining whether JsonParser.close() should clear current token information, accessible via JsonParser.currentToken().

If enabled (default for 2.20), current token IS cleared (set to null); if disabled, it remains as it was at time of close().

Default planned to be true (clear current token) as that seems more intuitive choice; but note that existing (2.19) behavior what false will do.

Since this is for 2.20, we have still time to consider choice of default.
(for 3.0 it should probably be true, at any rate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.20 Issue planned (at earliest) for 2.20
Projects
None yet
Development

No branches or pull requests

1 participant