json-builder 0.2.0 → 0.2.1
raw patch · 2 files changed
+9/−2 lines, 2 files
Files
- json-builder.cabal +2/−2
- src/Data/Json/Builder.hs +7/−0
json-builder.cabal view
@@ -1,5 +1,5 @@ Name: json-builder-Version: 0.2.0+Version: 0.2.1 Synopsis: Data structure agnostic JSON serialization License: BSD3 License-file: LICENSE@@ -44,4 +44,4 @@ source-repository this type: git location: http://github.com/lpsmith/json-builder- tag: v0.2.0+ tag: v0.2.1
src/Data/Json/Builder.hs view
@@ -30,6 +30,7 @@ , Escaped , JsArray(toArray) , JsObject(toObject)+ , Monoid(mempty, mappend, mconcat) ) where import Prelude hiding ((++))@@ -78,8 +79,14 @@ class JsObject a where toObject :: a -> Object +instance JsObject Object where+ toObject = id+ class JsArray a where toArray :: a -> Array++instance JsArray Array where+ toArray = id toBuilder :: Value a => a -> Builder toBuilder x = case toJson x of