libjwt-typed-0.2: A Haskell implementation of JSON Web Token (JWT)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Libjwt.JsonByteString

Description

JSON string

Synopsis

Documentation

newtype JsonByteString Source #

Represents a string which is already in JSON format.

Can be used for cases such as integration with aeson

data Account = MkAccount { account_name :: Text, account_id :: UUID }
  deriving stock (Show, Eq, Generic)

instance FromJSON Account
instance ToJSON Account

instance JwtRep JsonByteString Account where
  rep   = Json . encode
  unRep = decode . toJson

Constructors

Json 

Fields