packages feed

jsonifier 0.2.0.1 → 0.2.1

raw patch · 3 files changed

+23/−9 lines, 3 files

Files

jsonifier.cabal view
@@ -1,5 +1,5 @@ name: jsonifier-version: 0.2.0.1+version: 0.2.1 synopsis: Fast and simple JSON encoding toolkit description:   Minimalistic library for encoding JSON directly to strict bytestring,
library/Jsonifier.hs view
@@ -11,6 +11,8 @@      -- ** Primitives     null,+    true,+    false,     bool,      -- ** Numbers@@ -85,15 +87,27 @@   write 4 Poke.null  -- |+-- JSON @true@ Boolean literal.+{-# INLINE true #-}+true :: Bool -> Json+true =+  write 4 Poke.true++-- |+-- JSON @false@ Boolean literal.+{-# INLINE false #-}+false :: Bool -> Json+false =+  write 5 Poke.false++-- | -- JSON Boolean literal. {-# INLINE bool #-} bool :: Bool -> Json bool =   \case-    True ->-      write 4 Poke.true-    False ->-      write 5 Poke.false+    True -> true+    False -> false  -- | -- JSON Number literal from @Int@.
test/Main.hs view
@@ -198,10 +198,10 @@       \case         A.Array b           | Vector.length b == length a ->-            toList b-              & zip a-              & foldMap (\(aa, bb) -> fmap First (detectMismatchInSampleAndAeson aa bb))-              & fmap getFirst+              toList b+                & zip a+                & foldMap (\(aa, bb) -> fmap First (detectMismatchInSampleAndAeson aa bb))+                & fmap getFirst         b -> Just (ArraySample a, b)     ObjectSample a ->       \case