rust-lang/rust — pull request #16971 by treeman (2014-09-03 19:14:39+00:00)
Title: Derived Decodable can now handle Option<_> as optional input.

The motivation is to be able to decode json with optional fields, and
fill them in with None if missing. Impossible to do purely from
the implementation side as it does not know the type.

A generalization would be to specify default values for fields, this only defaults to `None` for `Option` types. This is not mandatory and is not done for rbml which keeps it's current behavior.

Closes #12794.