enum class DisabledMemberPolicy { ConvertToComment, Keep, Drop };
JSON and JSON5 have no -- syntax, so when Dialect::Json or Json5 meets a disabled member it applies this policy. No effect on Dialect::Fson, which always writes --key: value literally.
| Policy | fson-check flag | Json5 | Json |
|---|---|---|---|
ConvertToComment | (default) | synthesize a comment rendering key: value — one // line for a scalar, one per source line for a container | behaves like Drop (JSON cannot carry a comment) |
Keep | --keep | emit as an ordinary member, no -- prefix | same — may produce a duplicate key when a disabled member shadows an active one |
Drop | --drop-disabled | emit nothing | emit nothing |
FsonWriter w;
w.setDialect( FsonWriter::Dialect::Json );
w.setDisabledMemberPolicy( FsonWriter::DisabledMemberPolicy::Keep );
// --debug: true → "debug": true
The deprecated setKeepDisabledMembers(bool) maps true ↔ Keep, false ↔ ConvertToComment.

