Vladimir Glavnyy
Vladimir Glavnyy
> 1. Remove all padding. It is possible if use `bit_cast` whenever in C++ where access to scalars. It will put C++ implementation on an equal footing with other languages...
In the period 2020-2021 (18 months) the `idl_parser.cpp` was changed 64 times. > 411 deletions, 827 insertions Total lines: 3600. From my point of view, this file is pretty stable...
>Modifications to Parser will be necessary for future cross language development, such as the bag of ideas in #5875. Which ones are directly connected with the parsers (fbs, json, flex)?...
The current implementation of JSON serializer (bin to json) use fixed (6 and 12) precision specifier. https://github.com/google/flatbuffers/blob/3a88e1031be9ad97459c4de4f77319e19cbb648d/src/idl_gen_text.cpp#L63-L68 https://github.com/google/flatbuffers/blob/3a88e1031be9ad97459c4de4f77319e19cbb648d/include/flatbuffers/util.h#L179-L185 You can change these constants. Probably, `float_format` attribute or`JSON-option` for `GenerateText` method...
There is the only way - use hexadecimal literals as input (already supported) and output format. I use hexadecimal format when export JSON from CAD plugin then read this JSON...
> a simple switch to std::scientific in FloatToString() did the trick and fixed all my problems As a temporary workaround I propose to add `--float_format` option with a precision field:...
> Maybe there could be another flag value, e.g. flatc --float-format safe that makes that guarantee? I think this mode might be a default mode. There are two problems: 1....