← All field notes

dust field note

Read a JSON Field Without Sending It Back

A json_serializable field exclusion beside the Dust Serde alternative

How do you decode a field but leave it out of toJson()?

This is useful for API values that are read-only on the client. Add @SerDe(skipSerializing: true) to the field. Dust still reads it in fromJson(), but leaves it out of serialize() and toJson().

Read the Dust Serde field options.

#Dust #Serde #Dart #Flutter #JSON