Skip to content

feat: Implement Serializable interface for rich text classes#308

Merged
Rafal Niski (rafalniski) merged 2 commits intocontentful:masterfrom
zeatful:cdarich-serializable
Oct 28, 2024
Merged

feat: Implement Serializable interface for rich text classes#308
Rafal Niski (rafalniski) merged 2 commits intocontentful:masterfrom
zeatful:cdarich-serializable

Conversation

@zeatful
Copy link
Copy Markdown
Contributor

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.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.

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.
@zeatful zeatful (zeatful) requested a review from a team as a code owner October 1, 2024 15:08
@krishnakumarsamy
Copy link
Copy Markdown

We would love to have this added as we are kind of having hack workaround to resolve Serializable.

Copy link
Copy Markdown
Contributor

@rafalniski Rafal Niski (rafalniski) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafalniski Rafal Niski (rafalniski) merged commit 15468c7 into contentful:master Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants