-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Direct-to-bytes JSON Builder -- -- An API for encoding of arbitrary data-structures into JSON -- byte-arrays, which is faster and simpler than "aeson". -- -- Check out the demo. @package json-bytes-builder @version 0.5.1 module JSONBytesBuilder.ByteString.Builder -- | Produce a JSON ByteString builder with compact syntax from a literal -- builder. jsonLiteral :: Literal -> Builder -- | DSL for construction of JSON. module JSONBytesBuilder.Builder -- | Builder of any JSON literal. data Literal -- | JSON Null literal. null :: Literal -- | JSON Boolean literal from Bool. boolean :: Bool -> Literal -- | JSON Number literal from Int. numberFromInt :: Int -> Literal -- | JSON Number literal from Integer. numberFromInteger :: Integer -> Literal -- | JSON Number literal from Double. numberFromDouble :: Double -> Literal -- | JSON Number literal from Scientific. numberFromScientific :: Scientific -> Literal -- | JSON String literal from Text encoded using UTF8. stringFromText :: Text -> Literal -- | JSON String literal from lazy Text encoded using UTF8. stringFromLazyText :: Text -> Literal stringFromBytes :: ByteString -> Literal stringFromLazyBytes :: ByteString -> Literal -- | JSON Object literal from the Rows builder. object :: Rows -> Literal -- | JSON Array literal from the Elements builder. array :: Elements -> Literal -- | Builder of JSON Object rows. data Rows -- | Rows builder from a key-value pair, where value is an already encoded -- JSON literal. -- -- Use the Rows Monoid instance to construct multi-row -- objects. row :: Text -> Literal -> Rows -- | Builder of JSON Array elements. data Elements -- | Elements builder from an element, which is an already encoded JSON -- literal. -- -- Use the Elements Monoid instance to construct -- multi-element arrays. element :: Literal -> Elements module JSONBytesBuilder.ByteString.LazyByteString -- | Produce a lazy JSON ByteString with compact syntax from a literal -- builder. jsonLiteral :: Literal -> ByteString module JSONBytesBuilder.ByteString.ByteString -- | Produce a strict JSON ByteString with compact syntax from a literal -- builder. jsonLiteral :: Literal -> ByteString