Popularity
4.2
Declining
Activity
0.0
Stable
7
2
1

Monthly Downloads: 25
Programming language: Haskell
License: MIT License
Tags: Data     Buffer    

buffer-builder-aeson alternatives and similar packages

Based on the "buffer" category.
Alternatively, view buffer-builder-aeson alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of buffer-builder-aeson or a related project?

Add another 'buffer' Package

README

buffer-builder-aeson

A very fast buffer-builder-based JSON encoder for Aeson.

The whole library is a single Data.BufferBuilder.Json.ToJson instance for Data.Aeson.Value.

[Criterion benchmark](benchmark_results.txt)

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}

import Data.Aeson (object, (.=), Value (..))
import Data.BufferBuilder.Json (encodeJson)
import Data.BufferBuilder.Aeson ()
import qualified Data.ByteString as BS

stuff :: Value
stuff = Array
    [ object
        [ "name" .= ("eggs" :: String)
        , "price" .= (3.141592 :: Double)
        ]
    , object
        [ "name" .= ("cheese" :: String)
        , "price" .= (0.57721 :: Double)
        ]
    ]

main :: IO ()
main = do
    BS.putStrLn $ encodeJson stuff