Add JsonParser.willInternPropertyNames() for property name intern introspection (#1211)#1580
Merged
cowtowncoder merged 2 commits intoFasterXML:3.xfrom Mar 26, 2026
Conversation
Member
|
Quick note on naming: instead of "Field" code uses "Property" for keys of JSON Objects in 3.0. So let's rename method(s). EDIT: maybe rename as |
Member
|
Aside from naming (apologies, I should have updated the issue earlier), looks good. One thing we'll need before merging is CLA (from https://github.com/FasterXML/jackson/blob/main/CLA-jackson-2026.pdf) if not yet sent (only needs to be done once, before merging the first contribution; one is good for all future contributions). Looking forward to merging this, thank you! |
…pection (FasterXML#1211) Add ability to determine whether property name interning is enabled for a JsonParser instance, as suggested in GitHub issue FasterXML#1211. Changes: - Add willInternPropertyNames() to JsonParser with default returning false - Add isInternStrings() accessor to ByteQuadsCanonicalizer and CharsToNameCanonicalizer symbol tables - Override in UTF8StreamJsonParser, ReaderBasedJsonParser, UTF8DataInputJsonParser, and NonBlockingJsonParserBase to delegate to their respective symbol tables - Override in JsonParserDelegate to delegate to wrapped parser - Add comprehensive unit tests (InternPropertyNamesTest) covering all parser types with various feature configurations - Update DelegatesTest to verify delegation of new method - Add release notes entry under 3.2.0
6c7f399 to
d477b0f
Compare
Contributor
Author
|
@cowtowncoder signed CLA and updated naming |
Member
|
Received CLA; hoping to merge later today. |
JsonParser.willInternPropertyNames() for property name intern introspection (#1211)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ability to determine whether field name interning is enabled for a
JsonParserinstance, as suggested in GitHub issue #1211.Changes
JsonParser.willInternPropertyNames()with default returningfalseisInternStrings()accessor toByteQuadsCanonicalizerandCharsToNameCanonicalizersymbol tablesUTF8StreamJsonParser,ReaderBasedJsonParser,UTF8DataInputJsonParser, andNonBlockingJsonParserBaseto delegate to their respective symbol tablesJsonParserDelegateto delegate to wrapped parserInternFieldNamesTest) covering all parser types with various feature configurationsDelegatesTestto verify delegation of new methodCloses #1211