Skip to content

Replace kong.unirest JSONObject with Jackson in ZosmfStatus - #581

Merged
frankgiordano merged 1 commit into
zowe:mainfrom
Ashish-Kumar-Dash:zosmf-status-jackson
Jul 20, 2026
Merged

Replace kong.unirest JSONObject with Jackson in ZosmfStatus#581
frankgiordano merged 1 commit into
zowe:mainfrom
Ashish-Kumar-Dash:zosmf-status-jackson

Conversation

@Ashish-Kumar-Dash

Copy link
Copy Markdown
Contributor

ZosmfStatus was the last file in src/main still parsing JSON with kong.unirest.core.json.JSONObject; every other class in the SDK goes through JsonUtils (Jackson). This brings it in line and removes that last non-Jackson JSON code path.

Changes

  • Replaced the JSONObject/optJSONArray plugins-array parsing with JsonUtils.parse + JsonUtils.getArrayByField, the same pattern used in WorkflowList.getWorkflowsCommon.
  • Replaced the IntStream.range indexing with a plain for-each loop over the ArrayNode.
  • Preserved existing behavior exactly: a missing plugins field, a null value, and an empty array all still resolve to a zero-length ZosmfPlugin[] (verified via root.path(...).isArray() guard, which is false for both MissingNode and NullNode).

Signed-off-by: Ashish Kumar Dash <ashishdash2410@gmail.com>
@frankgiordano
frankgiordano self-requested a review July 20, 2026 18:51
@frankgiordano

Copy link
Copy Markdown
Collaborator

Good catch. This makes the code more readable.

@frankgiordano
frankgiordano merged commit f9d86cf into zowe:main Jul 20, 2026
4 checks passed
@frankgiordano frankgiordano added the enhancement New feature or request label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants