Crates.io | serde-capture |
lib.rs | serde-capture |
version | 0.1.0 |
source | src |
created_at | 2019-11-14 21:35:12.636003 |
updated_at | 2019-11-14 21:35:12.636003 |
description | 'Skip' deserialisation, but extract some, and retain the rest for later |
homepage | |
repository | https://github.com/FauxFaux/serde-capture |
max_upload_size | |
id | 181325 |
size | 4,287 |
Capture some part of a document during deserialisation, and store it serialised, instead of as a structure. This might use less memory.
This provides a:
pub struct CaptureJson<T> {
pub inner: T,
pub bytes: Box<[u8]>,
}
... which you can embed in your structure:
struct Doc {
foo: Vec<CaptureJson<Nothing>>,
}
... which should be smaller than Vec<Value>
, but with significantly
slower access.