How michiel/jsonapi-rust works
Main Components
a. Core Library Components:
• API Module (src/api.rs)
• Model Module (src/model.rs)
• Query Module (src/query.rs)
• Array Handler (src/array.rs)
• Error Handler (src/errors.rs)
b. External Interfaces:
• JSON-API Protocol Interface
• Serialization/Deserialization Layer
• Client Application Integration Point
┌─────────────────────────────────────────────┐
• Client Applications │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Public API Interface │
• (src/api.rs) │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Core Components │
• ┌───────────┐ ┌──────────┐ ┌────────────┐ │
• Model │ │ Query │ │ Array │ │
• (model.rs) │ │(query.rs)│ │ (array.rs) │ │
• ┘ └──────────┘ └────────────┘ │
• ┌─────────────────────┐ │
• Error Handling │ │
• (errors.rs) │ │
• ┘ │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• JSON Document Interface │
• ┘
Important Elements to Highlight
a. Data Flow:
• How JSON documents are parsed and validated
• How queries are processed
• Demonstrate error propagation paths
b. Integration Points:
• Clear entry points for client applications
• Serialization/deserialization boundaries
• Validation checkpoints
Implementation Details
• Relationship between model.rs and the JSON-API resource objects
• How query.rs handles parameter parsing and validation
• Demonstrate error propagation through the error handling system
• How array.rs manages collections of resources