How bazaarvoice/jolt works
Main Components
a. Core Transform Engine
• Main transform types (Shiftr, Defaultr, Removr, Sortr, CardinalityTransform)
• Transform interface as the base contract
b. Transform Chain System
• Chainr as the orchestrator
• How multiple transforms can be chained together
• ChainrBuilder and ChainrSpec components
c. Specification System
• How JSON specifications are processed
• SpecDriven interface connections
• Relationship with transform implementations
d. Common Utilities Layer
• JsonUtils and supporting classes
• Diffy for comparison operations
• Common path handling components
Component Relationships
• Input JSON → Transform Chain → Output JSON (main flow)
• JSON Specs → SpecDriven Transforms (configuration flow)
• Transform Chain → Individual Transforms (composition)
• Transforms → Common Utilities (dependency)
Architectural Patterns to Highlight
a. Chain of Responsibility
• How transforms are chained together
• Flow of data through the chain
b. Strategy Pattern
• How different transform implementations can be used
• Relationship between transforms and their specs
c. Builder Pattern
• ChainrBuilder's role in constructing transform chains
Implementation Details
Packages and their relationships:
com.bazaarvoice.jolt
• core transforms
• Shiftr
• Defaultr
• Removr
• Sortr
• CardinalityTransform
• chainr
• ChainrBuilder
• ChainrSpec
• common
• pathelement
• reference
• utils
• JsonUtils
External Interfaces
Integration points:
• JSON input/output interfaces
• Custom transform integration points
• CLI interface connection
Processing Flow
Main data flow: