Popularity
4.1
Declining
Activity
0.0
Stable
6
4
0

Monthly Downloads: 4
Programming language: Haskell
License: MIT License
Tags: Data     Web     Aeson    

aeson-applicative alternatives and similar packages

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

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

Add another 'aeson' Package

README

make To/From JSON instances from an applicative description

data R = R { a :: Text, b :: Int32 } deriving (Typeable)

rJsonInfo :: JsonInfo R
rJsonInfo = R
        <$> "a" @: a
        <*> 'b  @: b

instance ToJSON R where
  toJSON = jiToJSON rJsonInfo
instance FromJSON R where
  parseJSON = jiParseJSON rJsonInfo

This is a simple application of a bi-directional applicative DSL concept.

It has the advantage of not requiring Template Haskell. However, the resulting code will certainly be less efficient. A faster implementation would be to use Template Haskell to generate efficient code.