We plan to support FlatBuffers due to its high performance,
which may be useful for applications in payments and trading.
Experimental FlatBuffers schema have been released.
We’re interested in hearing your ideas for improvement.
Generation of the FlatBuffers schema proved challenging,
with several tradeoffs opting for consistency over efficiency.
Altough the grammar of the schema language has been neglected,
there are just a few typos, and some additional restrictions
that only become apparant upon compilation of schema.
The grammar has taken the approach of being quite restrictive,
in order to have wider compatibility with target languages.
This has meant making adjustments to cope with what we’ve modelled.
Types and Fields – FlatBuffers says “field name can not be the same as table/struct name” eg. PhoneNumber:[PhoneNumber] is prohibited.
For consistency, all fields are prepended by an underscore.
Codes – FlatBuffers enumerations start with underscrore or alpha.
ISO20022 has code values that start with numbers.
For consistency, all codes are prepended with underscores.
Empty CodeSets – For consistency, we set an enumerated value
NONE=0., else FlatBuffers says “default value of 0 for field _ is not part of enum”.
CodeSets – FlatBuffers “union value type may only be table/struct/string “.
We have models of a choice between a standard and proprietary code.
For consistency, all CodeSets are represented as a struct of an enumeration.
Types – corresponding types in flatbuffers are used where possible,
directly if identically named, wrapped in a struct if differently named,
otherwise defined as a table of a string. This means some open ended number types such as decimal and integer are represented as strings.
Choices of Choices – some models have choice of choice constructs. FlatBuffers restricts “union value type may only be table/struct/string “.
For consistency, all choices are represented as a table of a union.
Facets – We include the metaclass and facet information as metadata,
For consistency, we define all metaclass and facet attributes in each schema.
Topology – Further, the compiler requires declaration before use.
This requires a topological sort, so that independent types are listed first,
with the root type listed last.