on master help sign in
encode and decode JSValues instead of JSObjects

This is consistent with the aeson encode en decode. This does not change the benchmark results.

commita42161d8e77f94a13f34c915b687edc4a4e9e372 authorBas van Dijk <v.dijk.bas@gmail.com> dateWed 21 Dec 2011, 21:49 (15 years ago) parent102bdd7
1 file changed+2−2
benchmarks/CompareWithJSON.hs+2−2
benchmarks/CompareWithJSON.hs+2−2
@@ -18,13 +18,13 @@ instance NFData J.JSValue where
1818 rnf (J.JSArray lst) = rnf lst
1919 rnf (J.JSObject o) = rnf o
2020
21−encodeJ :: J.JSObject J.JSValue -> Int
21+encodeJ :: J.JSValue -> Int
2222encodeJ = length . J.encode
2323
2424encodeA :: A.Value -> Int64
2525encodeA = BL.length . A.encode
2626
27−decodeJ :: String -> J.JSObject J.JSValue
27+decodeJ :: String -> J.JSValue
2828decodeJ s =
2929 case J.decodeStrict s of
3030 J.Ok v -> v