core icon indicating copy to clipboard operation
core copied to clipboard

Integrate Jackson Optional Mapper in ObjectMapper for Handling Optional Fields

Open josemejias11 opened this issue 7 months ago • 0 comments

Parent Issue

Problem Statement

Enhance the existing ObjectMapper code by integrating Jackson’s Optional Mapper to handle fields that may or may not be present in the JSON data.

Steps to Reproduce

  1. Create a content type with a WYSIWYG
  2. Add some html to the WYSIWYG
  3. Convert the WYSIWYG to a block field
  4. See the error in the log

https://gist.github.com/josemejias11/6fc25dfc713503d94addb1b673b75a01

Acceptance Criteria

The ObjectMapper should correctly handle JSON objects with optional fields, mapping them to Optional types in the application code.

dotCMS Version

24.06.26

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

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

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

Screenshot 2024-06-27 at 11 34 44 AM

Sub-Tasks & Estimates

No response

josemejias11 avatar Jun 27 '24 21:06 josemejias11