- Use
aeson
'sdecode
function in theAsJSON
instance forByteString
s. This allows removing a direct dependency onattoparsec
. - Allow building with
aeson-2.2
.
- Add
atKey :: AsValue t => Key -> Traversal' t (Maybe Value)
, a variant ofkey
that usesat
instead ofix
.
- Change the
IsKey
instances forByteString
s to usedecodeUtf8With lenientDecode
instead ofdecodeUtf8
. While theseIsKey
instances are meant to used for interoperability withaeson
values that are UTF-8–encoded, usingdecodeUtf8With lenientDecode
at least ensures that converting a non–UTF-8–encodedByteString
will not crash.
-
Require
aeson-2.0.2.*
andlens-5.0.*
or greater. -
Change the types of
_Object
,key
, andmembers
:-_Object :: Prism' t (HashMap Text Value) +_Object :: Prism' t (KeyMap Value) -key :: AsValue t => Text -> Traversal' t Value +key :: AsValue t => Key -> Traversal' t Value -members :: AsValue t => IndexedTraversal' Text t Value +members :: AsValue t => IndexedTraversal' Key t Value
This mirrors similar changes made in
aeson-2.0.*
, where the type ofObject
's field was changed fromHashMap Text Value
toKeyMap Value
.The
Ixed Value
instance changes similarly:-type instance Index Value = Text +type instance Index Value = Key
-
Remove
Primitive
andAsPrimitive
, since https://tools.ietf.org/html/rfc7159 de-emphasized the notion of primitive versus composite JSON values.- The
AsPrimitive
methods (_Value
,_String
, and_Bool
) are nowAsValue
methods. _Number
's default signature,Bool_
,String_
, andNull_
now have anAsValue
constraint.
- The
-
Add
Wrapped
andRewrapped
instances forKeyMap
. These treatKeyMap v
as a wrapper around[(Key, v)]
. The order in which the key-value pairs appear in this list is not stable. -
Add an
IsKey
class, whose method_Key
is anIso
for converting values to and from aKey
.
- Drop support for pre-8.0 versions of GHC.
- Allow building with
aeson-2.0.0.0
. - Add
Index
,IxValue
,Ixed
,At
, andEach
instances forKeyMap
if building withaeson-2.0.0.0
or later.
- Allow building with
lens-5.*
. - The build-type has been changed from
Custom
toSimple
. To achieve this, thedoctests
test suite has been removed in favor of usingcabal-docspec
to run the doctests.
- Generalize the type of
_JSON
fromPrism' t a
toPrism t t a b
. If you wish to continue to use the less general type, use the newly added_JSON'
prism. - Add pattern synonyms corresponding to the
Prism
s thatlens-aeson
provides. - Fix the test suite on 32-bit architectures.
- Support
doctest-0.12
- Revamp
Setup.hs
to usecabal-doctest
. This makes it build withCabal-2.0
, and makes thedoctest
s work withcabal new-build
and sandboxes.
- Fix tests to work against vector-0.11
- Documentation fixes
- No functional changes since 1.0.0.4
- Move lens upper bound to < 5 like the other packages in the family
- Module migrated from lens package to Data.Aeson.Lens
- Added
members
andvalues
- Broadened dependencies
- Repository initialized