packages feed

json-builder 0.2.3 → 0.2.4

raw patch · 2 files changed

+12/−5 lines, 2 filesdep +vectorPVP ok

version bump matches the API change (PVP)

Dependencies added: vector

API changes (from Hackage documentation)

Files

json-builder.cabal view
@@ -1,5 +1,5 @@ Name:                json-builder-Version:             0.2.3+Version:             0.2.4 Synopsis:            Data structure agnostic JSON serialization License:             BSD3 License-file:        LICENSE@@ -37,7 +37,8 @@                        containers,                        text,                        unordered-containers,-                       utf8-string+                       utf8-string,+                       vector  source-repository head   type:     git@@ -46,4 +47,4 @@ source-repository this   type:     git   location: http://github.com/lpsmith/json-builder-  tag:      v0.2.3+  tag:      v0.2.4
src/Data/Json/Builder/Implementation.hs view
@@ -56,8 +56,8 @@  import qualified Data.Text              as T import qualified Data.Text.Lazy         as TL- import qualified Data.HashMap.Lazy      as HashMap+import qualified Data.Vector            as Vector  (++) :: Monoid a => a -> a -> a (++) = mappend@@ -79,7 +79,6 @@ instance Value Json where   toJson = id - -- | The 'Escaped' type represents json string syntax.  The purpose of this -- type is so that json strings can be efficiently constructed from multiple -- Haskell strings without superfluous conversions or concatinations.@@ -307,6 +306,13 @@  instance Value a => JsArray [a] where   toArray = foldr (\a as -> element a ++ as) mempty++-- | renders as an 'Array'+instance Value a => Value (Vector.Vector a) where+  toJson = toJson . toArray++instance Value a => JsArray (Vector.Vector a) where+  toArray = Vector.foldr (\a as -> element a ++ as) mempty  -- | renders as an 'Object' instance (JsString k, Value a) => Value (Map.Map k a) where