Refactor: Implements serde
trait for RawJsonb
#77
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.
This PR introduces implementations of the
serde::de::Deserializer
andserde::ser::Serializer
traits for theRawJsonb
struct.Functionality Added:
serde::de::Deserializer
forRawJsonb
: Enables deserialization ofRawJsonb
instances directly from various data sources using Serde's flexible deserialization framework.serde::ser::Serializer
forRawJsonb
: Enables serialization ofRawJsonb
instances into various data formats using Serde's serialization framework.RawJsonb
to utilize the new Serde implementations. This involves removing direct manipulation of binary JSONB data and replacing it with calls to Serde's serialization and deserialization APIs, along with underlying API calls.Benefits:
RawJsonb
through Serde's standard interfaces, simplifying code and improving readability. This reduces the need for direct manipulation of the underlying JSONB representation.RawJsonb
can now rely on Serde for these tasks, leading to cleaner and more maintainable code.RawJsonb
. This makes the code easier to understand, debug, and extend.RawJsonb
implementation. Future work can now easily add support for different JSONB formats (e.g., SQLite, PostgreSQL) by implementing the necessary Serde serialization/deserialization logic without requiring modifications to the coreRawJsonb
structure or the functions that use it. This promotes a more modular and adaptable design.fix #73
part of #72 #74