add `Key()` method to `Writer` and `PrettyWriter`