diff options
Diffstat (limited to 'Val.hs')
-rw-r--r-- | Val.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3,9 +3,9 @@ module Val where import Memory +import Serialization import GHC.Generics (Generic) -import Data.Aeson import Data.Aeson.Types import qualified Codec.Binary.Base64 as B64 import qualified Data.Text as T @@ -19,6 +19,8 @@ newtype Val = Val { val :: B.ByteString } instance DataSize Val where dataSize (Val b) = fromIntegral (B.length b) +instance Serialize Val + -- | JSON instances for Val, using base64 encoding when the value -- is not utf-8 encoded, and otherwise using a more efficient encoding. instance ToJSON Val where |