diff --git a/Text/Pandoc/JSON.hs b/Text/Pandoc/JSON.hs
--- a/Text/Pandoc/JSON.hs
+++ b/Text/Pandoc/JSON.hs
@@ -59,6 +59,7 @@
 where
 import Text.Pandoc.Definition
 import Text.Pandoc.Walk
+import Text.Pandoc.Generic
 import Data.Maybe (listToMaybe)
 import Data.Data
 import Data.ByteString.Lazy (ByteString)
@@ -96,6 +97,17 @@
 instance (Walkable a Pandoc) => ToJSONFilter (a -> IO a) where
   toJSONFilter f = BL.getContents >>=
      (walkM f :: Pandoc -> IO Pandoc) . either error id . eitherDecode' >>=
+     BL.putStr . encode
+
+instance Data a => ToJSONFilter (a -> [a]) where
+  toJSONFilter f = BL.getContents >>=
+    BL.putStr . encode . (bottomUp (concatMap f) :: Pandoc -> Pandoc) .
+    either error id . eitherDecode'
+
+instance Data a => ToJSONFilter (a -> IO [a]) where
+  toJSONFilter f = BL.getContents >>=
+     (bottomUpM (fmap concat . mapM f) :: Pandoc -> IO Pandoc) .
+     either error id . eitherDecode' >>=
      BL.putStr . encode
 
 instance (ToJSONFilter a) => ToJSONFilter ([String] -> a) where
diff --git a/pandoc-types.cabal b/pandoc-types.cabal
--- a/pandoc-types.cabal
+++ b/pandoc-types.cabal
@@ -1,5 +1,5 @@
 Name:                pandoc-types
-Version:             1.12
+Version:             1.12.1
 Synopsis:            Types for representing a structured document
 Description:         @Text.Pandoc.Definition@ defines the 'Pandoc' data
                      structure, which is used by pandoc to represent
