serde-capture 0.1.0

'Skip' deserialisation, but extract some, and retain the rest for later
Documentation

serde-capture

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.