Safe Haskell | None |
---|---|
Language | Haskell2010 |
The LaunchDarkly SDK supports a subset of Aeson 1.x and 2.x. These two versions differ in their type signatures, but are otherwise largely compatible. To support both versions, we provide this compatibility module.
Depending on the version of Aeson you have installed, this module will expose a KeyMap type that is either
- In the case of 1.x, a HashMap T.Text, or
- In the case of 2.x, the new KeyMap type
The compatibility layer exposes common map operations that the SDK needs and may prove useful to customers. In nearly all instances, these are simple aliases for the underlying Aeson equivalents.
The Aeson 2.x KeyMap is keyed by a new Key type that does not exist in 1.x. To keep the API as consistent as possible, all functions requiring a key will provide a Text value. In the 2.x compatibility layer, we will convert it to a from the appropriate Key type as necessary.