Comments (5)
Actually it serialized as "2016-08-16T16:41:52.757059590"... which I guess breaks the "no fluff" premise of bincode... but I think the way serde is designed it leaves things up to the type definer so not much can be done about that AFAIK.
from bincode.
Looks like a bug in chrono.
It should be calling deserializer.deserialize_str
instead of deserializer.deserialize
.
@mikedilger to understand why this is a problem: deserialize
expects the deserializer to be able to tell from the input what data type is there. For example JSON can see a curly brace {
and know that that means a map, or it can see a quote "
and know that that means a string. For performance reasons bincode does not serialize any of this fluff punctuation so it has no way to tell from the input what type is there. Serde handles this by letting Deserialize implementations hint to the deserializer what type it expects to deserialize, which they do by calling methods like deserialize_str
instead of plain deserialize
.
from bincode.
I made a chrono PR with a fix chronotope/chrono#89.
from bincode.
Actually it serialized as "2016-08-16T16:41:52.757059590"... which I guess breaks the "no fluff" premise of bincode...
I plan to do something about that in Chrono 0.3. As far as I understand, the ability to change the representation per the (de)serializer is heavily dependent of the specialization.
from bincode.
@dtolnay @lifthrasiir Thanks!
from bincode.
Related Issues (20)
- Deserialize external tag to separate type variable HOT 1
- Arc/Rc handling clarification HOT 1
- Is there a way to patch 1.x? HOT 1
- Add codec support for chrone HOT 3
- Unclear why serialized_size() yields different results HOT 1
- Does bincode guarantee a 1:1 relationship between encodings and values? HOT 3
- bincode::de::Deserializer::with_reader() doesn't seem to work HOT 1
- Issue when decoding a simple Enum with no member values. HOT 1
- make config::DefaultOptions::new `const` HOT 1
- Add note about Maps to readme HOT 7
- Cannot deserialize VecDeque with structure of Decimals HOT 4
- Discriminant size in `fixint` serialization of `Option<T>` HOT 3
- Build pipeline fails HOT 1
- Support retrieving the bytes written from encode HOT 6
- Decode is only implemented for Arc<str> and not Rc<str>
- deserialize into allocator HOT 3
- falling test with serde::skip_serializing_if HOT 3
- Are initial "buffer size" bytes in bincode2 decode_from_slice really required? HOT 4
- BorrowDecode not implemented for slices of borrowed elements HOT 2
- Different int encoding option for integers and enum variant tags 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 bincode.