Repository navigation
Issue #768 extract URIs nested inside JSON arrays - #771
Merged
ato merged 1 commit intoSep 22, 2026
Merged
Conversation
Collaborator
|
Thanks! |
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.
Fixes #768.
parse()calledpropertyStream()on array nodes, which Jackson returns emptyfor anything that is not an object, so URIs inside an array held as an object
property value were never extracted. Those array elements now go through the same
value handling as object values, which is also what lets a bare URI string inside
an array be extracted and not only an object holding one.
A known limit this does not change:
parse()still starts fromrootNode.properties(), so a document whose root is itself an array yields nolinks.
valueStream()rather thanelements(): both iterate the elements of an array,and neither is deprecated in the 2.22.2 Jackson this builds against, so the
choice is one of style β
valueStream()matches the 2.19-style node API thisfile already uses,
properties()and thepropertyStream()being replaced here.The extractor already recurses through nested objects without a depth guard.
This patch applies the same recursive approach to arrays; adding a depth limit
is outside this defect fix.
ExtractorJsonTestcovers it: the object-property case passes before and afteras a control, and the two array cases go from failing to passing. Full
modulessuite, JDK 17 on Ubuntu 22.04 with
LANG=C.UTF-8: 254 run, 2 failures, 1 skippedbefore the change; 254 run, 0 failures, 1 skipped after. The single skip
(
FetchHTTPTest) is the same in both runs.Built and measured against
abd17fa.