curl-aeson alternatives and similar packages
Based on the "json" category.
Alternatively, view curl-aeson alternatives based on common mentions on social networks and blogs.
-
xml-to-json-fast
Fast, light converter of xml to json capable of handling huge xml files -
digestive-functors-aeson
Run digestive-functors against a JSON document -
aeson-better-errors
Better errors when decoding JSON values -
highjson
Haskell: Low boilerplate, easy to use and very fast Haskell JSON serialisation and parsing -
json-rpc-server
A Haskell implementation of JSON RPC 2.0 on the server side. -
json-rpc-client
Functions for creating a Haskell JSON-RPC 2.0 client. -
log2json
Take an httpd.conf style LogFormat string and parse log files into JSON records.
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of curl-aeson or a related project?
README
<!-- -- mode: markdown; coding: utf-8 -- -->
curl-aeson library for Haskell
This is a library for communicating with JSON over HTTP connection. It supports rich set of HTTP connectivity features provided by curl library combined to the performance and elegance of aeson.
Author: Joel Lehtonen [email protected]
This library is at its best when communicating with simple, non-standardized JSON interfaces. If you are implementing JSON-RPC compliant client or server, take a look at another library.
Example
In this example we fetch latest bid and ask values from a Bitcoin exchange using their public API:
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import Data.Aeson
import Network.Curl.Aeson
ticker :: IO (Double,Double)
ticker = curlAesonGetWith p "https://bitcoin-central.net/api/v1/ticker/eur"
where
p (Object o) = do
bid <- o .: "bid"
ask <- o .: "ask"
return (bid,ask)
p _ = mzero
You may find more examples from package documentation.
Installation
On Ubuntu and Debian
Starting from Ubuntu 12.04 and Debian wheezy, all dependencies are found from repositories:
sudo apt-get install libghc-aeson-dev libghc-curl-dev cabal-install
Then just install this:
cabal install
Other
Install and configure Haskell Platform. Then, fetch all the requirements and install this library by running:
cabal update
cabal install
License
Following the convention of Haskell community, this library is licensed under the terms of BSD 3-clause license. Personally I prefer GPLv3, but this library is simple enough to be released with non-copyleft license.
The license text is included in LICENSE file.
Contact
I'm not an expert in doing software packages, so feel free to correct me by sending pull requests. Also, I would like to hear if you have found my library to be useful.
*Note that all licence references and agreements mentioned in the curl-aeson README section above
are relevant to that project's source code only.