collection-json
collection-json copied to clipboard
[Proposal] mutability (and readme fixes)
Changes:
- The proposal
- A typo in the description
- The values type
is there already a "read-only" property that does this?
Like a readonly, yes, but I don't found it in the spec/extensions.
And, imho, if I can, I prefer a single word (mutable, writable, ...) to avoid to enforce the case style.
I'm thinking again about the readonly
VS mutable
: do they really mean the same thing?
mutable
meaning: restricted modification, once already set (e.g. a contract term, the contractors, ...)
readonly
meaning: restricted modification (eventually internal modification only. e.g. an identifier, the timestamps, ...)
Additionaly, a mutable
provides a way to what property needs to be retrieved until filled, reducing the collections sizes, throughout the exchanges.
A few like the HTML readonly
, the user can't modify the value, but the server can.
{ readonly: false, mutable: true} // writable by everyone
{ readonly: true, mutable: true} // writable but not allowed to you
{ readonly: false, mutable: false } // writable by everyone, once only
{ readonly: true, mutable: false } // writable but not allowed to you, once only
ok, let's do this:
head over to the collection-json org (https://github.com/collection-json/extensions) and let's start this as an official extension. there are minimal steps and it will make it easily availbale to everyone who wants to adopt it.
we can continue the discussion there.
Hi, just done ;)