because JsonValue is not accepted by serde as a deseralization target. I'd like to get the content parsed into the usual JsonValue tree, from which I can then extract fields.
On a related note, is it possible to deserialize key-value pairs into an array of enums?
There's probably a simpler way, but you can always write your own implementation of Deserialize instead of deriving it: there's a bit of busy work with implementing a serde::de:: Visitor because serde needs to handle formats that aren't self-describing. For JSON, just use deserialize_any in the Deserialize impl, passing a Visitor impl with a visit_map() where you can read and switch on the keys and values in order.
Within the serde architecture it's actually harder to not allow partial parse. It it bans partial parse it should document why it does so with extra effort. For example serde_urlencoded crate doesn't allow nested fields as documented, since x-www-form-urlencoded format doesn't have such concept.
How do you do the second part of this? I have have a JsonValue, and want to parse that into a struct for which Deserialize has been derived. There's "from_str", but not "from_value". I suppose I could serialize the JsonValue into a string and then deserialize from the string, but that's silly.