Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Haskell re-implementation of cfn_flip
Synopsis
- yamlFileToJson :: (MonadIO m, FromJSON a) => FilePath -> m a
- yamlToJson :: (MonadIO m, FromJSON a) => ByteString -> m a
- jsonToYamlFile :: (MonadUnliftIO m, ToJSON a) => FilePath -> a -> m ()
- jsonFileToYaml :: MonadUnliftIO m => FilePath -> m ByteString
- jsonToYaml :: (MonadUnliftIO m, ToJSON a) => a -> m ByteString
Documentation
yamlFileToJson :: (MonadIO m, FromJSON a) => FilePath -> m a Source #
Read a file of Yaml and produce a FromJSON
a
yamlToJson :: (MonadIO m, FromJSON a) => ByteString -> m a Source #
Convert a ByteString
of Yaml to a FromJSON
a
jsonToYamlFile :: (MonadUnliftIO m, ToJSON a) => FilePath -> a -> m () Source #
Write a 'ToJSON a
to a file as Yaml
jsonFileToYaml :: MonadUnliftIO m => FilePath -> m ByteString Source #
Read a file of JSON and produce a ByteString
of Yaml
NB. The conversion occurs at Value
.
jsonToYaml :: (MonadUnliftIO m, ToJSON a) => a -> m ByteString Source #
Convert a 'ToJSON a' to a ByteString
of Yaml