No one has responded to my previous post, so I assume either everyone is now satisfied with the schema, and .arduboy format in general, or is tired of discussing it and has taken a "whatever" attitude, or is busy with other things. I don't want to spend much more time on it myself, but in the interest of making the schema more explicit and self-documenting:
With JSON a null string is valid, so even though some strings, such as "title", are set as "required", something like
"title: "" would be valid. I'm sure that our intent in making some strings "required" was that the author provides at least one character in them.
The JSON schema specification includes "minLength" and "maxLength" keywords to constrain the size of strings. I'm thinking of adding
"minLength": 1 to all the "required" string fields: "title", "version", "author", button "control" and "action", and the "filename" fields.
However, I have two questions:
Should even the optional string fields, if included, be required to provide at least one character?
It depends on how a loader parses and presents optional string fields. If they're always presented as an empty title, even if not included in info.json, then it doesn't matter. If the loader checks for a null string and treats it the same as if the field were not included in info.json, then again it doesn't matter. If the loader expects that if the field is present it should contain something that can be displayed, then it helps to try and assure that.
Do we want to restrict some/all strings to a maximum length? (in which case "maxLength" could be added to specify this.)
I'm sure that loaders wouldn't allow an "infinite" size string, and things like "title" probably have a limited display area reserved for proper formatting and presentation. Things like filenames could be limited by the O/S itself (255 is a typical maximum filename length).
So do any of the loaders presently have any of the restrictions above, or are there any thoughts on what they should be?
FYI the optional strings (other than filenames) are: "description", "publisher", "idea", "code", "art", "sound", and "title" for binaries and screenshots.