← All blogs

dust blog

Generate Only the JSON Direction You Need

Manual JSON request and response models beside Dust Serde direction-specific derives

Flutter and Dart apps still spend a lot of time moving data through JSON.

Not every model needs the same work.

A request model may only need to send data. A response model may only need to read data.

Dust Serde lets each model choose its direction.

Use Serialize() for output. Use Deserialize() for input. Use both only when the model needs both.

That keeps generated JSON code scoped to the model’s real job.

It also makes review easier. You can see which models are allowed to leave the app and which models are only built from incoming data.

Read the Dust Serde guide.

#Dust #Serde #Flutter #Dart #CodeGeneration