Implement flexible target specification

See commit message.
Hm I would expect an `Option<T>` to correspond to `None` if they key isn't present for a map, but it doesn't look like the json decoder has that. It shouldn't be [too hard to add](https://github.com/rust-lang/rust/blob/master/src/libserialize/json.rs#L2029-L2034) though.