matrix-bot-0.2.0: Matrix multipurpose bot
Safe HaskellNone
LanguageHaskell2010

MatrixBot.AesonUtils

Synopsis

Documentation

myGenericToJSON :: (Generic a, Typeable a, GToJSON' Value Zero (Rep a)) => a -> Value Source #

myGenericParseJSON :: (Generic a, Typeable a, GFromJSON Zero (Rep a)) => Value -> Parser a Source #

cutTypeNamePrefix :: Typeable a => Proxy a -> Options -> Options Source #

Cut type name prefix from each field

For instance if type is called “Foo” and its fields are “fooBar” and “fooBaz” then its fields will be named “bar” and “baz”. If prefix doesn’t equal to “foo” (to the type name) then the field name stays unchanged.

camelCaseToSnakeCase :: Options -> Options Source #

Convert “camelCase” to “snake_case” for each field