aeson-diff 1.1.0.14 → 1.1.0.15
raw patch · 3 files changed
+10/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- aeson-diff.cabal +1/−1
- lib/Data/Aeson/Pointer.hs +4/−2
CHANGELOG.md view
@@ -1,3 +1,8 @@+aeson-diff 1.1.1.15++ * Allow empty json keys in pointer syntaxAllow empty json keys in pointer syntax+ https://github.com/clintonmead/aeson-diff/pull/14+ aeson-diff 1.1.0.14 * Fix pointer application after json roundtrip
aeson-diff.cabal view
@@ -1,5 +1,5 @@ name: aeson-diff-version: 1.1.0.14+version: 1.1.0.15 synopsis: Extract and apply patches to JSON documents. description: .
lib/Data/Aeson/Pointer.hs view
@@ -121,8 +121,10 @@ let l = T.split (== '~') t in T.concat $ take 1 l <> fmap step (tail l) key t- | T.null t = fail "JSON components must not be empty."- | T.all isNumber t = return (AKey (read $ T.unpack t))+ | not (T.null t) && T.all isNumber t = return (AKey (read $ T.unpack t))+ -- Note: The empty string is a valid json key and may appear in a pointer as+ -- in <http://tools.ietf.org/html/rfc6901> the grammar for reference-token says+ -- `reference-token = *( unescaped / escaped )` | otherwise = return . OKey . fromText $ unesc t instance ToJSON Pointer where