Skip to content

Implement generic serialization/deserialization#260

Merged
ed255 merged 7 commits intomainfrom
feat/general-serialization
Jun 10, 2025
Merged

Implement generic serialization/deserialization#260
ed255 merged 7 commits intomainfrom
feat/general-serialization

Conversation

@ed255
Copy link
Collaborator

@ed255 ed255 commented Jun 6, 2025

  • Move all backend-specific serialization code to the backend.
  • Extend the Pod trait to allow full serialization of any pod as a trait object so that serialization is fully generic.
  • Implement deserialization for each pod in a generic way (following the same interface) and add a registry in the middleware to handle deserialization of any registered pod
    • Libraries that use pod2 can register new pod types to be deserialized. They can do that by calling the new middleware function register_pod_deserializer
  • The frontend no longer imports the backend for deserialization and instead uses the middleware functionality for generic deserialization.
  • Change the implementation of MainPod and MockMainPod pub_self_statements method to return the non-padded list of statements so that they match with the data that the PodBuilder generates. This way we can skip some data processing in serialization/deserialization.

Resolve #258

@ed255 ed255 force-pushed the feat/general-serialization branch from a239bfe to f60d8f3 Compare June 6, 2025 17:29
@ed255 ed255 force-pushed the feat/general-serialization branch from f60d8f3 to 0167872 Compare June 6, 2025 17:33
@ed255 ed255 requested a review from robknight June 6, 2025 17:34
@ed255 ed255 force-pushed the feat/general-serialization branch from f164914 to 681c1f6 Compare June 9, 2025 11:08
Copy link
Collaborator

@robknight robknight left a comment

Choose a reason for hiding this comment

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

lgtm! I think it would be worth aligning the name of kvs and dict but otherwise all looks good.

@robknight robknight self-requested a review June 9, 2025 16:31
@ed255 ed255 merged commit 621f8be into main Jun 10, 2025
6 checks passed
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.

Deserialization of introduction pods defined in external libraries

2 participants