graph TD
Start[Start JsonFormatter] --> PrepData[Prepare Input Data]
subgraph DataPrep[Data Preparation]
PrepData --> CheckInputs[Validate Input Data]
CheckInputs --> FormatDate[Format Date String]
end
subgraph JsonConstruction[JSON Construction Phase]
FormatDate --> InitJson[Initialize JSON Structure]
InitJson --> ProcessCategory[Add Category and Date]
ProcessCategory --> InitProducts[Initialize Products Array]
InitProducts --> ProductLoop[Process Each Product]
ProductLoop --> FormatTitle[Format Title]
FormatTitle --> FormatBullets[Format Bullet Points]
FormatBullets --> FormatDesc[Format Description]
FormatDesc --> FormatPrice[Format Price]
FormatPrice --> FormatReviews[Format Reviews Object]
FormatReviews --> FormatKeywords[Format Keywords Array]
FormatKeywords --> CheckMore{More Products?}
CheckMore --> |Yes| ProductLoop
CheckMore --> |No| FinalizeJson[Finalize JSON Structure]
end
subgraph OutputPhase[Output Delivery]
FinalizeJson --> ValidateJson[Validate JSON Format]
ValidateJson --> StoreMemory[Store in Memory]
end
StoreMemory --> End[End JsonFormatter]