Comments (3)
@t-mat
This was actually simpler than I thought it might be, so I was able to fix it right away in . Thanks again for reporting this issue, it's been added as a unit test.
One note of warning is that because you append a null character to your serialized buffer, when you copy to your output string and use ser.size()
, this will include your null character in your output string, you'll get two null characters at the end of your string and your string's size will include the first null character. It's usually better to simply use std::string
as your buffers to avoid these kinds of bugs and not need to append your own null characters.
from glaze.
This has now been fully fixed as of #1011. The floating point conversion code hadn't supported std::vector<std::byte>
so the float was being casted to an int. Glaze now blocks these implicit conversions and correctly supports std::vector<std::byte>
from glaze.
Thanks for sharing this bug. I should be able to fix it tomorrow.
from glaze.
Related Issues (20)
- calculate serialize size before serialization and serialize to pre-allocated memory HOT 4
- Option to use partial with char* or char[] HOT 7
- data_must_be_null_terminated issue HOT 4
- Raw char buffer handling HOT 2
- Built-in support for type control HOT 3
- reflection fails with custom serializer for std::chrono types on clang/gcc HOT 7
- How do I write an enum as a raw string? HOT 1
- compile error with error_on_missing_keys HOT 1
- old GCC 11.4.0 compiler support HOT 8
- Link to NDJSON website looks sus... HOT 2
- [ICE] `msvc 17.8` (`glaze 2.8.1`) HOT 1
- Numeric variant deduction type
- Write_binary/read_binary support for the "json_t" interface HOT 6
- is_[json_type] concepts in glz:: namespace
- Compilation error when structure have more than 32 fields HOT 1
- How to pass glz::read_json to a std::function? HOT 1
- Support std::variant<...,std::variant<...> > HOT 2
- repe::registry needs to handle throws on function calls
- Tuple routines not working as expected HOT 1
- Does glaze handle structs with static members ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glaze.