fn goes_to_store(key: &Value, writes_key: impl Fn(&str) -> bool) -> boolExpand description
Whether key belongs in a map’s unrecognised-key store rather than in one
of the map’s own fields, given that map’s writes_key.
This is the writing half’s question: an entry naming a key the map already
writes from a field is not written a second time from the store, since a
CBOR map carrying one key twice is a map no two readers need agree on. The
reading half asks a finer one — see unrecognised, which has to tell two
entries with the same key apart.
A non-text key is unrecognised by construction: every key this format defines is text.