4 ms·
If you only want a single field in json, you define a struct with just that single field. Serde does have the ability to return an error about unknown fields, b
by codys 5y ago
If you only want a single field in json, you define a struct with just that single field. Serde does have the ability to return an error about unknown fields, but it is not enabled by default.
This also informs your second question. If new optional fields in json are added, unless you tell serde to complain about them, it won't, and you can add the new Option at your leisure.