dotCMS / dotCMS/core

JSON viewtool not working properly when text responses are returned

Open
#32,775 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Maintenance Type : New Functionality
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

User Story

As a user i want to be able to use the JSON viewtool for apis returning text responses as well, at the moment when an api returns text response the JSON viewtool doesn't work correctly and breaks, the internal exception is as follows

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `java.util.HashMap` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{"data":{"homeLoanProduct":{"loanType":"Variable","productDataId":1111,"securityType":"ResidentialProperty","product":{"productDataId":1111,"institutionId":XXXX}}}}')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]

https://github.com/user-attachments/assets/5271c23b-f905-4186-b410-07053266e4ac

Acceptance Criteria

JSON viewtool must support for text responses as well

Proposed Objective

Customer Support

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://helpdesk.dotcms.com/a/tickets/32184

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the JSON viewtool handling for API responses and reproduce the failure with a text response matching the issue's Jackson exception. Trace how the text response is processed, then verify that the JSON viewtool supports text responses without breaking and that the reported deserialization exception no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.