An idea I had is to decorate the deserialization source with a jsonpath so you can select data inside of it that you want to be deserialized into your struct
Stage 1 Prototype is to deserialize into serde_json::Value, apply the jsonpath, and then use serde_jsons from_value to convert it into the final format.
Stage 2 is to actually make a serde Deserializable.
Stage 3 is the option of a macro for this so it has minimal runtime overhead for a purely state selection
An idea I had is to decorate the deserialization source with a jsonpath so you can select data inside of it that you want to be deserialized into your struct
Stage 1 Prototype is to deserialize into
serde_json::Value
, apply the jsonpath, and then useserde_json
sfrom_value
to convert it into the final format.Stage 2 is to actually make a serde Deserializable.
Stage 3 is the option of a macro for this so it has minimal runtime overhead for a purely state selection