collection-json icon indicating copy to clipboard operation
collection-json copied to clipboard

[Proposal] mutability (and readme fixes)

Open Lcfvs opened this issue 5 years ago • 7 comments

Changes:

  • The proposal
  • A typo in the description
  • The values type

Lcfvs avatar Jun 12 '19 14:06 Lcfvs

is there already a "read-only" property that does this?

mamund avatar Jun 14 '19 13:06 mamund

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.

Lcfvs avatar Jun 15 '19 12:06 Lcfvs

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, ...)

Lcfvs avatar Jun 16 '19 11:06 Lcfvs

Additionaly, a mutable provides a way to what property needs to be retrieved until filled, reducing the collections sizes, throughout the exchanges.

Lcfvs avatar Jun 16 '19 12:06 Lcfvs

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

Lcfvs avatar Jun 16 '19 14:06 Lcfvs

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.

mamund avatar Jun 21 '19 13:06 mamund

Hi, just done ;)

Lcfvs avatar Jun 28 '19 16:06 Lcfvs