Skip to content

Extend Aeson to support wrapped types #7

Description

@glguy

Transferring over this issue as posted by bos ekmett/lens#423

At the moment, combinators like key are polymorphic over some types, but not all. For instance, I can use key on either a ByteString or a Value.

The http-client library defines a Response type, such that I can have a Response ByteString or a Response Value. I cannot currently figure out how to swizzle the various moving parts such that I can use key and other combinators on one of these.

(Of course I have a responseBody lens, so I can write responseBody . key "foo", but my wish is to be able to more simply write key "foo" instead.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions