Hoogle Search
Within LTS Haskell 22.21 (ghc-9.6.5)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Functions for serializing the Pandoc AST to JSON and deserializing from JSON. Example of use: The following script (capitalize.hs) reads reads a JSON representation of a Pandoc document from stdin, and writes a JSON representation of a Pandoc document to stdout. It changes all regular text in the document to uppercase, without affecting URLs, code, tags, etc. Run the script with
pandoc -t json | runghc capitalize.hs | pandoc -f json
or (making capitalize.hs executable)pandoc --filter ./capitalize.hs
#!/usr/bin/env runghc import Text.Pandoc.JSON import Data.Char (toUpper) main :: IO () main = toJSONFilter capitalizeStrings capitalizeStrings :: Inline -> Inline capitalizeStrings (Str s) = Str $ map toUpper s capitalizeStrings x = x
JSONFilter :: FilePath -> Filterpandoc Text.Pandoc.App No documentation available.
JSONFilter :: FilePath -> Filterpandoc Text.Pandoc.Filter No documentation available.
applyJSONFilter :: MonadIO m => Environment -> [String] -> FilePath -> Pandoc -> m Pandocpandoc Text.Pandoc.Filter No documentation available.
readCslJson :: (PandocMonad m, ToSources a) => ReaderOptions -> a -> m Pandocpandoc Text.Pandoc.Readers Read CSL JSON from an input string and return a Pandoc document. The document will have only metadata, with an empty body. The metadata will contain a references field with the bibliography entries, and a nocite field with the wildcard `[@*]`.
readJSON :: (PandocMonad m, ToSources a) => ReaderOptions -> a -> m Pandocpandoc Text.Pandoc.Readers Read pandoc document from JSON format.
module Text.Pandoc.Readers.
CslJson Parses CSL JSON bibliographies into a Pandoc document with empty body and references and nocite fields in the metadata. A wildcard nocite is used so that if the document is rendered in another format, the entire bibliography will be printed. https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html.
readCslJson :: (PandocMonad m, ToSources a) => ReaderOptions -> a -> m Pandocpandoc Text.Pandoc.Readers.CslJson Read CSL JSON from an input string and return a Pandoc document. The document will have only metadata, with an empty body. The metadata will contain a references field with the bibliography entries, and a nocite field with the wildcard `[@*]`.
writeCslJson :: PandocMonad m => WriterOptions -> Pandoc -> m Textpandoc Text.Pandoc.Writers No documentation available.
writeJSON :: PandocMonad m => WriterOptions -> Pandoc -> m Textpandoc Text.Pandoc.Writers No documentation available.
Page 1 of 2 | Next