Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize documents as document w/ separate serde #21

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

mtdowling
Copy link
Member

Documents are now serialized as a document when serialized through a ShapeSerializer. The contents and inner data model contained within a document can be accessed using Document#serializeContents. This allows ShapeSerializer to receive documents as just documents and the schema of a document matches the data model type written to the serializer. It also allows serializers to, if they care, access the contents of the document. This change makes documents more principled and paves the way towards implementing validation without lots of special casing.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mtdowling mtdowling force-pushed the simplify-list-serializer branch from 90e6149 to d108ee0 Compare April 10, 2024 16:36
@mtdowling mtdowling changed the base branch from simplify-list-serializer to main April 10, 2024 17:20
Documents are now serialized as a document when serialized through a
ShapeSerializer. The contents and inner data model contained within
a document can be accessed using Document#serializeContents. This
allows ShapeSerializer to receive documents as just documents and
the schema of a document matches the data model type written to the
serializer. It also allows serializers to, if they care, access the
contents of the document. This change makes documents more principled
and paves the way towards implementing validation without lots of
special casing.
@mtdowling mtdowling force-pushed the document-content-separation branch from a66b036 to ffbbf54 Compare April 10, 2024 17:22
@mtdowling mtdowling merged commit 5fddae4 into main Apr 10, 2024
3 checks passed
@mtdowling mtdowling deleted the document-content-separation branch April 10, 2024 17:32
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.

3 participants