Skip to content

Commit 7ee9265

Browse files
committed
[C#] Address some of Martin's feedback re "added" var data representation.
The SBE spec doesn't explicitly allow variable-length data or groups to be added to existing message schemas, i.e., only block-level fields may be added; however in practice the encoders/decoders for some languages do support the addition of var data fields. Previously, I had represented these "added" var data fields as optional strings or byte arrays, but having chatted with Martin, we think it is better to mimick the existing decoder representation, i.e., use empty strings/arrays to represent missing elements. In this commit, I've also fixed some instances where I was checking `token.version() > 0` where I should have been checking `token.version() > sinceVersionOfParentContainer`. Ideally, I would have liked to remove such checks entirely, but the C# and C++ codecs do not give sensible responses when decoding older versions in some cases, i.e., you _must_ check the presence of the field before accessing it.
1 parent 248eae9 commit 7ee9265

File tree

3 files changed

+131
-98
lines changed

3 files changed

+131
-98
lines changed

0 commit comments

Comments
 (0)