feat: Implement Serializable interface for rich text classes#308
Merged
Rafal Niski (rafalniski) merged 2 commits intocontentful:masterfrom Oct 28, 2024
Merged
Conversation
The changes in this commit add the Serializable interface to various classes in the `com.contentful.java.cda.rich` package. This allows these classes to be easily serialized and deserialized, which is important for use cases where the rich text data needs to be persisted or transmitted over a network. The main classes that now implement Serializable are: - `CDARichTableCell` - `CDARichQuote` - `CDARichListItem` - `CDARichTableRow` - `CDARichTable` - `CDARichText` - `CDARichNode` - `CDARichMark` - `CDARichHorizontalRule` - `CDARichList` - `CDARichUnorderedList` - `CDARichEmbeddedInline` - `CDARichHyperLink` This change will enable better integration with other systems and frameworks that require serializable data, and will improve the overall flexibility and usability of the rich text handling functionality in the Contentful Java CDA SDK.
|
We would love to have this added as we are kind of having hack workaround to resolve Serializable. |
Mitch Goudy (mgoudy91)
approved these changes
Oct 24, 2024
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.
I propose adding the Serializable interface for CDARich items so that when consuming the library I can cache and use other tools requiring direct Java serialization/deserialization of these objects. Gitbutler AI generated the below message for the commit message.
The changes in this commit add the Serializable interface to various classes in the
com.contentful.java.cda.richpackage. This allows these classes to be easily serialized and deserialized, which is important for use cases where the rich text data needs to be persisted or transmitted over a network.The main classes that now implement Serializable are:
CDARichTableCellCDARichQuoteCDARichListItemCDARichTableRowCDARichTableCDARichTextCDARichNodeCDARichMarkCDARichHorizontalRuleCDARichListCDARichUnorderedListCDARichEmbeddedInlineCDARichHyperLinkThis change will enable better integration with other systems and frameworks that require serializable data and will improve the overall flexibility and usability of the rich text handling functionality in the Contentful Java CDA SDK.