Permalink
Browse files

encode and decode JSValues instead of JSObjects

This is consistent with the aeson encode en decode.
This does not change the benchmark results.
  • Loading branch information...
1 parent dcc6b73 commit 38e14828a01393e0bc16bbded3f4c71087b50d25 @basvandijk basvandijk committed Dec 21, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 benchmarks/CompareWithJSON.hs
View
4 benchmarks/CompareWithJSON.hs
@@ -18,13 +18,13 @@ instance NFData J.JSValue where
rnf (J.JSArray lst) = rnf lst
rnf (J.JSObject o) = rnf o
-encodeJ :: J.JSObject J.JSValue -> Int
+encodeJ :: J.JSValue -> Int
encodeJ = length . J.encode
encodeA :: A.Value -> Int64
encodeA = BL.length . A.encode
-decodeJ :: String -> J.JSObject J.JSValue
+decodeJ :: String -> J.JSValue
decodeJ s =
case J.decodeStrict s of
J.Ok v -> v

0 comments on commit 38e1482

Please sign in to comment.