Improve specification of default values, including support for other syntaxes

Description

Currently the section on default values is not well explained, and contains non-systematic ODIN syntax. It should also show how to support JSON.

Activity

Show:
Thomas Beale
May 20, 2020, 9:55 AM
Edited

Ok but what do you have coming before the (json) <# ... #>? I would expect _default = ?

I.e. is it this:

Pieter Bos
May 20, 2020, 10:05 AM

Yes, _default = (json) <# … #> or _default = (type) < … >. I don’t have strong opinions on ‘=' or ‘:’, but I have not checked if ':’ clashes with other rules in the syntax. = works well.

Thomas Beale
May 20, 2020, 10:41 AM

Ok, let’s go with ‘=', I think that’s more obvious, and is UML-like as well. I’ll update the spec today on this.

Pieter Bos
May 20, 2020, 1:33 PM

Sounds good.

One very minor remark on your example. I think it’s missing {} at the beginning at end of the json, or the content will not be valid json, so:

Thomas Beale
May 20, 2020, 2:38 PM

Er… yes!

Reporter

Thomas Beale

Raised By

Pieter Bos

Components

Affects versions

Configure