First attempt. Missing support for non-dict values.