Chrono currently depends on an old version of time with a reported
vulnerability: https://rustsec.org/advisories/RUSTSEC-2020-0159
While it does not use any vulnerable code, the dependency may show
up in code vulnerability scans, etc.
This removes the "oldtime" feature from chrono, to remove that.
Also removes the "std" feature because it doesn't seem to be in use
in this code.
Chrono currently depends on an old version of time with a reported
vulnerability: https://rustsec.org/advisories/RUSTSEC-2020-0159
While it does not use any vulnerable code, the dependency may show
up in code vulnerability scans, etc.
This removes the "oldtime" feature from chrono, to remove that.
Also removes the "std" feature because it doesn't seem to be in use
in this code.
This introduces the `serde_with` dependency and `rust_type.py`, to allow supporting arbitrary types for serialization.
Since fields may have arbitrary types (eg. `HashMap<_, chrono::Duration>`) which need deserialization, it is necessary to
use type-based serialization to avoid implementing (de)serialization for every permutation of types that require special serialization.
However, `serde` does not let you (de)serialize one type as another (eg. `chrono::Duration` as `Wrapper`) - thus necessitating `serde_with`, which does. `rust_type.py` introduces the `RustType` class, which makes it easy to describe the (de)serialization type used by `serde_with`