packages feed

jsonpath 0.1.0.2 → 0.2.0.0

raw patch · 4 files changed

+22/−17 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.JSONPath.Types: data BegingingPoint
- Data.JSONPath.Types: instance GHC.Classes.Eq Data.JSONPath.Types.BegingingPoint
- Data.JSONPath.Types: instance GHC.Show.Show Data.JSONPath.Types.BegingingPoint
+ Data.JSONPath.Types: data BeginningPoint
+ Data.JSONPath.Types: instance GHC.Classes.Eq Data.JSONPath.Types.BeginningPoint
+ Data.JSONPath.Types: instance GHC.Show.Show Data.JSONPath.Types.BeginningPoint
- Data.JSONPath.Types: CurrentObject :: BegingingPoint
+ Data.JSONPath.Types: CurrentObject :: BeginningPoint
- Data.JSONPath.Types: Filter :: BegingingPoint -> [JSONPathElement] -> Condition -> Literal -> JSONPathElement
+ Data.JSONPath.Types: Filter :: BeginningPoint -> [JSONPathElement] -> Condition -> Literal -> JSONPathElement
- Data.JSONPath.Types: Root :: BegingingPoint
+ Data.JSONPath.Types: Root :: BeginningPoint

Files

ChangeLog.md view
@@ -1,17 +1,22 @@ # Changelog for jsonpath-hs +## v0.2.0.0++* BreakingChange: Fix typo in `BeginningPoint`.+* Fix typo in parser error.+ ## v0.1.0.2 -* Remove upper bounds from dependencies, as most of them are quite stable packages+* Remove upper bounds from dependencies, as most of them are quite stable packages.  ## v0.1.0.1 -* Import Data.Semigroup to support GHC 8-* Add test json files to make sure test sdist compile and runs+* Import Data.Semigroup to support GHC 8.+* Add test json files to make sure test sdist compile and runs.  ## v0.1.0.0 -* Start the project+* Start the project.   ## Unreleased changes
jsonpath.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 05858fc895e0f57cbc4ec4533a099e4e1e46a8fc3cecb94f464ecca44dfec2e1+-- hash: 4d0aa69594f07e7d4fcd3167a3479d8c56427dab956b8dfc48e86323ade6adf7  name:           jsonpath-version:        0.1.0.2+version:        0.2.0.0 synopsis:       Library to parse and execute JSONPath description:    Please see the README on GitHub at <https://github.com/akshaymankar/jsonpath-hs#readme> category:       Text, Web, JSON
src/Data/JSONPath/Parser.hs view
@@ -15,15 +15,15 @@  jsonPathElement :: Parser JSONPathElement jsonPathElement = do-    (keyChildDot <?> "keyChldDot")+    (keyChildDot <?> "keyChildDot")     <|> (keyChildBracket <?> "keyChildBracket")     <|> (keyChildren <?> "keyChildren")     <|> (anyChild <?> "anyChild")     <|> (slice <?> "slice")     <|> (sliceUnion <?> "sliceUnion")     <|> (filterParser <?> "filterParser")-    <|> (search <?> "serach")-    <|> (searchBeginingWithSlice <?> "serachBegingingWithSlice")+    <|> (search <?> "search")+    <|> (searchBeginningWithSlice <?> "searchBeginningWithSlice")  slice :: Parser JSONPathElement slice = Slice <$> ignoreSurroundingSqBr sliceWithoutBrackets@@ -121,7 +121,7 @@ filterParser :: Parser JSONPathElement filterParser = do   _ <- string "[?(" <?> "[?("-  b <- beginingPoint <?> "begining point"+  b <- beginningPoint <?> "beginning point"   js <- jsonPath <?> "jsonPathElements"   c <- condition <?> "condition"   l <- literal <?> "literal"@@ -136,16 +136,16 @@     then Search <$> many1 jsonPathElement     else  fail "not a search element" -searchBeginingWithSlice :: Parser JSONPathElement-searchBeginingWithSlice = do+searchBeginningWithSlice :: Parser JSONPathElement+searchBeginningWithSlice = do   _ <- string ".."   isBracket <- (== '[') <$> peekChar'   if isBracket     then Search <$> many1 jsonPathElement     else  fail "not a search element" -beginingPoint :: Parser BegingingPoint-beginingPoint = do+beginningPoint :: Parser BeginningPoint+beginningPoint = do   ((char '$' $> Root) <|> (char '@' $> CurrentObject))  condition :: Parser Condition
src/Data/JSONPath/Types.hs view
@@ -1,5 +1,5 @@ module Data.JSONPath.Types-  ( BegingingPoint(..)+  ( BeginningPoint(..)   , Condition(..)   , Literal(..)   , JSONPathElement(..)@@ -11,7 +11,7 @@ import Data.Text import Data.JSONPath.ExecutionResult -data BegingingPoint = Root+data BeginningPoint = Root                     | CurrentObject   deriving (Show, Eq) @@ -40,6 +40,6 @@                       | AnyChild                       | Slice SliceElement                       | SliceUnion SliceElement SliceElement-                      | Filter BegingingPoint [JSONPathElement] Condition Literal+                      | Filter BeginningPoint [JSONPathElement] Condition Literal                       | Search [JSONPathElement]   deriving (Show, Eq)