aditya0yadav commented on PR #50:
URL: https://github.com/apache/dubbo-python/pull/50#issuecomment-2957077834

   
   Hi @cnzakii,
   Aditya here 👋
   
   This is an exemplary pull request to demonstrate JSON serialization support 
in the Python Dubbo framework.
   
   ### Purpose
   
   The goal of this PR is to add JSON serialization capabilities using 
Pydantic, by building a modular structure around `DubboCodec` and the codec 
registry. This helps streamline how JSON is handled and decoded between 
services in a clean and extensible manner.
   
   ### Highlights
   
   * Introduced modular codec handling using `DubboCodec`
   * JSON serialization with Pydantic models for both request and response
   
   ### Example
   
   **Client:**
   
   ```python
   self.unary = client.unary(
       method_name="unary",
       codec_type="json",
       request_model=UserListResponse,
       response_model=UserRequest
   )
   ```
   
   **Server:**
   
   ```python
   method_handler = RpcMethodHandler.unary(
       UserServiceHandler().list_users,
       method_name="unary",
       codec_type="json",
       request_model=UserRequest,
       response_model=UserListResponse
   )
   ```
   
   ### Notes
   
   * Variable naming has been done thoughtfully, but open to suggestions if any 
part feels unclear.
   * Please review and let me know if any adjustments are needed.
   * I can also provide the full client/server examples if required.
   
   Thanks for reviewing this! Let me know your thoughts.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to