Popularity
3.1
Declining
Activity
0.0
Stable
2
3
1
Monthly Downloads: 1
Programming language: Haskell
License: MIT License
json-fu alternatives and similar packages
Based on the "json" category.
Alternatively, view json-fu alternatives based on common mentions on social networks and blogs.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai

Do you think we are missing an alternative of json-fu or a related project?
README
json-fu: Generic JSON serialization / deserialization
Requires
{-# LANGUAGE DeriveDataTypeable #-}
import Data.Data
import Data.ByteString (ByteString)
import Data.JSON
Converts fields into snake_case
data Person = Person {
firstName :: String
, lastName :: String
, age :: Int
} deriving (Eq, Show, Data, Typeable)
person :: ByteString
person = toJSON (Person "John" "Doe" 23)
This will resutl in JSON that is equivalent to:
{
"first_name":"John",
"last_name": "Doe",
"age": 23
}
parseJSON person >>= fromJSON :: Maybe Person
can be used to recover the
original data type.
Strips constructor name from fields
data Message = Message {
messageBody :: String
, messageBodySize :: Int
} deriving (Eq, Show, Data, Typeable)
message :: ByteString
message = toJSON (Message "foobar" 6)
This will resutl in JSON that is equivalent to:
{
"body": "foobar",
"body_size": 6
}
parseJSON message >>= fromJSON :: Maybe Message
can be used to recover the
original data type.