feat: implement complete JSON serialization system with response classes #7

Closed
master wants to merge 3 commits from refactoring/json-encapsulation into main
Owner
  • Add abstract JsonSerializable base class with toJson/fromJson methods
  • Create comprehensive response classes for complete JSON document handling:
    • ClusterMembersResponse for cluster member data
    • TaskStatusResponse and TaskControlResponse for task operations
    • NodeStatusResponse, NodeEndpointsResponse, NodeOperationResponse for node data
  • Implement concrete serializable classes for all data types:
    • NodeInfoSerializable, TaskInfoSerializable, SystemInfoSerializable
    • TaskSummarySerializable, EndpointInfoSerializable
  • Refactor all service classes to use new serialization system
  • Reduce service method complexity from 20-30 lines to 2-3 lines
  • Eliminate manual JsonDocument creation and field mapping
  • Ensure type safety and compile-time validation
  • Maintain backward compatibility while improving maintainability

Breaking change: Service classes now use response objects instead of manual JSON creation

- Add abstract JsonSerializable base class with toJson/fromJson methods - Create comprehensive response classes for complete JSON document handling: * ClusterMembersResponse for cluster member data * TaskStatusResponse and TaskControlResponse for task operations * NodeStatusResponse, NodeEndpointsResponse, NodeOperationResponse for node data - Implement concrete serializable classes for all data types: * NodeInfoSerializable, TaskInfoSerializable, SystemInfoSerializable * TaskSummarySerializable, EndpointInfoSerializable - Refactor all service classes to use new serialization system - Reduce service method complexity from 20-30 lines to 2-3 lines - Eliminate manual JsonDocument creation and field mapping - Ensure type safety and compile-time validation - Maintain backward compatibility while improving maintainability Breaking change: Service classes now use response objects instead of manual JSON creation
master added 1 commit 2025-09-22 21:56:11 +02:00
- Add abstract JsonSerializable base class with toJson/fromJson methods
- Create comprehensive response classes for complete JSON document handling:
  * ClusterMembersResponse for cluster member data
  * TaskStatusResponse and TaskControlResponse for task operations
  * NodeStatusResponse, NodeEndpointsResponse, NodeOperationResponse for node data
- Implement concrete serializable classes for all data types:
  * NodeInfoSerializable, TaskInfoSerializable, SystemInfoSerializable
  * TaskSummarySerializable, EndpointInfoSerializable
- Refactor all service classes to use new serialization system
- Reduce service method complexity from 20-30 lines to 2-3 lines
- Eliminate manual JsonDocument creation and field mapping
- Ensure type safety and compile-time validation
- Maintain backward compatibility while improving maintainability

Breaking change: Service classes now use response objects instead of manual JSON creation
master added 2 commits 2025-09-23 21:36:40 +02:00
master closed this pull request 2025-09-29 22:42:24 +02:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iot/spore#7
No description provided.