-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/general serde #48
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
Conversation
- Introduce GeneralSerde to handle both Pydantic BaseModel instances and regular JSON objects. - Use model_dump_json for Pydantic models, falling back to json.dumps for non-Pydantic objects. - Maintain consistency with existing serde implementations.
…_hints for clarity
igalshilman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ouatu-ro,
great stuff!
I've left few comments for you to address, after that really looks good to me to merge!
… up GeneralSerde logging
- Updated imports and default serializer/deserializer in **context**, handler, object, **server_context**, service, and workflow modules. - DefaultSerde provides a unified approach for JSON serialization/deserialization, ensuring compatibility with both Pydantic models and standard JSON objects.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
|
Renamed |
igalshilman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, looks good to me!
Adds a general serde that can handle serialisation for both Pydantic objects and regular JSON objects. Tested for workflows, services and virtual objects.
Related to #45