lens / lens-aeson

Traversals and Prisms for Data.Aeson
MIT License
50 stars 18 forks source link

Allow building with aeson-2.0.0.0 #39

Closed RyanGlScott closed 2 years ago

RyanGlScott commented 2 years ago

aeson-2.0.0.0 changes Object's field from a HashMap to a new KeyMap type. This patch adapts lens-aeson to the new API. h/t to phadej/aeson-optics@ff31ca0578482df11002f0cde974ff51b8559e1c, on which I based this patch.

We may want to consider changing the type of _Object later (#38), but that should probably wait until we can depend on aeson >= 2 unconditionally.

Fixes #37.