gen-object-api for dictionaries/maps #8399
Replies: 1 comment
-
|
As far as I'm aware, I suspect this is intentional for a few reasons:
For example, a schema like: table Item {
id:string (key);
value:int;
}
table Container {
items:[Item];
}still fundamentally describes an ordered collection of That said, I can definitely see the appeal of having the Object API expose keyed vectors as I don't believe there is currently a flag to force this behavior. If maintainers have considered it before, I'd be interested to know whether the main concerns are API compatibility, cross-language consistency, serialization semantics, or something else. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently --gen-object-api generates vectors for arrays, even if the array type is a table with a (key).
Shouldn't flatbuffers generate a
std::unordered_maporstd::mapinstead? All of the supported key types are already hashable.Is there a way to force this behavior already?
Beta Was this translation helpful? Give feedback.
All reactions