You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #30 added support for default values for integer fields (uint8, int8, etc) using syntax like uint16 length = 0. But there is no support for defaulting string fields, or for representing a null value. This is needed for example in ws nukleus to set the reason in the End frame extension to indicate there is no specified reason (workaround is setting it to "", empty string, although of course that is not the same semantically).
A null string would be represented either by setting the length byte (or short in the case of string16) to a special value (like 0xff or 0xffff) and rejecting strings of that length (i.e. effectively reducing the maximum supported string length by one), or by making it a one character string where the character is a special value which is not a valid UTF-8 character.
If no default value is supplied, behavior will remain as now: Builder's requires a value to be set.
The text was updated successfully, but these errors were encountered:
PR #30 added support for default values for integer fields (uint8, int8, etc) using syntax like
uint16 length = 0
. But there is no support for defaulting string fields, or for representing a null value. This is needed for example in ws nukleus to set the reason in the End frame extension to indicate there is no specified reason (workaround is setting it to "", empty string, although of course that is not the same semantically).Proposed syntax (example):
A null string would be represented either by setting the length byte (or short in the case of string16) to a special value (like 0xff or 0xffff) and rejecting strings of that length (i.e. effectively reducing the maximum supported string length by one), or by making it a one character string where the character is a special value which is not a valid UTF-8 character.
If no default value is supplied, behavior will remain as now: Builder's requires a value to be set.
The text was updated successfully, but these errors were encountered: